Html 引导程序和 css 之间的区别

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/36520383/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 13:06:44  来源:igfitidea点击:

difference between bootstrap and css

htmlcss

提问by becky

What is a difference between Bootstrap and CSS? I read the questions in stackoverflow saying that if you want responsive website and also, you are a newbie in Styling use bootstrap! ? Is Bootstrap something for beginners?

Bootstrap 和 CSS 有什么区别?我阅读了 stackoverflow 中的问题,说如果你想要响应式网站,而且你是造型的新手,请使用引导程序!? Bootstrap 适合初学者吗?

回答by Andrew1996

Bootstrap is essentially a front-end Framework that makes designing webpages and the general development easier. Bootstrap uses CSS, however it's different to writing your own CSS as it's all pre done so you just add a class to a HTML element and then it will use that CSS. So for example adding the class "img-responsive" to will use the pre made img-responsive class which is in the external Bootstrap CSS file.

Bootstrap 本质上是一个前端框架,它使设计网页和一般开发更容易。Bootstrap 使用 CSS,但是它与编写自己的 CSS 不同,因为它都是预先完成的,因此您只需向 HTML 元素添加一个类,然后它就会使用该 CSS。因此,例如添加类“img-responsive”将使用外部 Bootstrap CSS 文件中预先制作的 img-responsive 类。

Bootstrap is great because it allows you to easily create a responsive, cross browser compatible website really easily. For example making the site responsive without Bootstrap would require you using Media Queries etc, whereas with Bootstrap you can just give your divs class names to make it responsive.

Bootstrap 很棒,因为它可以让您轻松创建响应式、跨浏览器兼容的网站。例如,在不使用 Bootstrap 的情况下使站点具有响应性将需要您使用媒体查询等,而使用 Bootstrap 时,您只需提供 divs 类名称即可使其具有响应性。

Essentially Bootstrap uses CSS. But it's different to writing your own CSS as it's all pre made for you and you just need to import the external CSS file made by the people at Bootstrap, and you just need to know which classes to use etc.

基本上 Bootstrap 使用 CSS。但这与编写自己的 CSS 不同,因为它都是为您预先制作的,您只需要导入 Bootstrap 人员制作的外部 CSS 文件,您只需要知道要使用哪些类等。

回答by dlolsen

Bootstrapis a "framework", that is: a pre-built set of files. Included in these files is CSS. Bootstrap uses, among other things, extensive CSS classes to style websites.

Bootstrap是一个“框架”,即:一组预先构建的文件。这些文件中包含 CSS。Bootstrap 使用广泛的 CSS 类来设计网站样式。

You can use Bootstrap without understanding CSS but if you are a beginner you should really learn HTML & CSS first.

您可以在不了解 CSS 的情况下使用 Bootstrap,但如果您是初学者,您应该首先学习 HTML 和 CSS。

W3Schoolsis a great resource to start learning about HTML & CSS

W3Schools是开始学习 HTML 和 CSS 的绝佳资源

回答by Manohar Reddy Poreddy

Bootstrap is a free and open-source front-end framework (library) for designing websites and web applications.

Bootstrap 是一个免费的开源前端框架(库),用于设计网站和 Web 应用程序。

Other answers are good. In addition, some more key details:

其他答案都很好。此外,还有一些关键细节:

  1. Bootstrap 4 released in 2018, is a major rewrite from Bootstrap 3
  2. Bootstrap 4 does not work with older browsers (IE8, IE9), some have concerns over this, if you have same concerns then learn the older Bootstrap 3
  1. Bootstrap 4 于 2018 年发布,是对 Bootstrap 3 的重大重写
  2. Bootstrap 4 不适用于较旧的浏览器(IE8、IE9),有些人对此有顾虑,如果您有同样的顾虑,请学习较旧的 Bootstrap 3

At a quick glance, Bootstrap 4 looks to have steep learning curve compared to CSS3. Needed a grid for a small project, for simplicity & for learning CSS3 fundamentals (as other answer pointed), chose CSS3 over bootstrap. (CSS3 Grid, looks simple to code, examples: link1, link2, link3, link4, link5. Detailed description is here)

乍一看,与 CSS3 相比,Bootstrap 4 看起来具有陡峭的学习曲线。需要一个小项目的网格,为了简单和学习 CSS3 基础知识(如其他答案所指),选择 CSS3 而不是 bootstrap。(CSS3 Grid,代码看起来很简单,例子:link1, link2, link3, link4, link5。详细说明在这里