这里有很多与Bootstrap相关的问题。我看到很多人都在用它。所以我试着去研究它,我找到了官方的Bootstrap网站,但那里只有一个下载部分和几句话。没有什么能解释它是干什么用的……我只知道它是一个前端助手。我试图通过谷歌搜索一些东西,但没有找到具体的东西。我所找到的一切都与计算机科学的定义有关。

所以,我的问题是:

什么是Bootstrap ? 它的用途是什么,它如何帮助前端开发? 我还想了解更多细节。


当前回答

Bootstrap is the world’s most popular and widely used open-source framework for developing with HTML, CSS, and JS. It is a front-end framework of HTML. Bootstrap helps in building responsive websites or web applications and a 12-column grid system that helps dynamically adjust the website to a suitable screen resolution. The current version of bootstrap is 4.3.1 and the bootstrap team has also officially announced Bootstrap 5 version and changes like removing jquery from bootstrap. Some of the crucial reasons why the bootstrap framework is most preferable are

它很容易使用 Bootstrap有很大的社区支持 定制可以很容易地完成 它提高了开发速度 响应性 更多详细信息,请登录官方网站:https://getbootstrap.com/

在进行基于Bootstrap的项目时,建议使用Bootstrap 5管理模板。

来源:https://vmokshagroup.com/blog/bootstrap-advantages/

其他回答

免责声明:我在过去使用过自举,但我从来没有真正欣赏它实际上是什么,这个描述来自我自己的定义,今天。我知道bootstrap v4已经过时了,但是我发现bootstrap v3的文档更清晰,所以我用了它。标准库不会从根本上改变它所提供的内容。

短暂的

Bootstrap是一个CSS和javascript文件的集合,它为标准html元素提供了一些漂亮的默认样式,以及一些不是标准html元素的常见web内容对象。

打个比方,这有点像在ppt中应用一个主题,但对于你的网站来说:它让事情看起来很好,不需要太多的初始努力。

它由什么组成?

官方v3文档将其分为三个部分:

CSS 组件 Javascript

这些大致对应于Bootstrap提供的三个主要内容:

Plain CSS files that style standard html elements. So, Bootstrap makes your standard elements pretty-looking. e.g. html: <input class="btn btn-default" type="button" value="Input">Click me</button> CSS files that use styling on standard html elements to make them into something that is not a standard html element but is a standard Bootstrap element (e.g. https://getbootstrap.com/docs/3.3/components/#progress). In this way Bootstrap extends the list of "standard" web elements in a visually consistent way. e.g. html: <span class="glyphicon glyphicon-align-left"></span> The CSS classes are designed with jQuery in mind. Internally, Bootstrap uses jQuery selectors to modify the styles on the fly and interact with the DOM, and thus provides the user the same capability. I believe this requires more explanation, so...

使用Javascript / jQuery

Bootstrap极大地扩展了jQuery。如果我们查看源代码,我们可以看到它使用jQuery来做以下事情:为keydown事件设置侦听器以与下拉菜单交互。当您在<script>标签中导入它时,它会完成所有这些jQuery设置,因此您需要确保在Bootstrap加载之前加载jQuery。

此外,它比普通的jQuery更紧密地将javascript绑定到DOM,提供了一个javascript类接口。例如,以编程方式切换按钮。请记住,CSS只是定义一个事物的外观,因此这些操作的主要工作往往是修改在那个时刻应用于元素的CSS类。这种基于用户输入的更改不能用普通CSS完成。

还有其他标准的与用户的交互,我们互联网居民习惯了,不包括在CSS。比如,点击一个向下滚动页面的链接,而不是更改页面。Bootstrap提供给你的一件事是在你自己的网站上实现这种行为的简单方法。

标准

我在这里多次提到“标准”这个词,这是有充分理由的。我认为Bootstrap提供的最好的东西是一套好看的标准。你可以随心所欲地修改默认主题,但这是一个比原始html, css和js更好的基线。这就是为什么它被称为“框架”。

不同的浏览器有不同的默认样式,可以有不同的行为,需要不同的CSS前缀之类的东西。Bootstrap的一个主要好处是,它比自己编写所有跨浏览器的东西要可靠得多(我敢肯定,你仍然会有问题,但它更容易)。

我认为当gulp和babel不受欢迎时,Bootstrap更受欢迎。看看Bootstrap,它似乎来自于人们编译javascript之前的时代。它仍然是相关的,但你现在可以从其他来源获得一些好处。

最新版本的CSS允许您在这些静态列表发生变化时定义它们之间的转换。Bootstrap的原始版本实际上早于浏览器广泛采用这一功能之前,所以它们仍然有自己的动画类。有一些Bootstrap是这样的:其他的东西出现在它周围,使它看起来有点多余。

简单地说,Bootstrap可以理解为一个前端web框架,它是由Twitter创建的,用于更快地创建设备响应式web应用程序。Bootstrap也可以主要理解为定义在其中的CSS类的集合,可以简单地直接使用。它利用CSS, javascript, jQuery等在后台为Bootstrap元素创建样式,效果和动作。

You might know that we use CSS for styling webpage elements and create classes and assign classes to webpage elements to apply the style to them. Bootstrap here makes the designing simpler since we only have to include Bootstrap files and mention Bootstrap's predefined class names for our webpage elements and they will be styled automatically through Bootstrap. Through this, we get rid of writing our own CSS classes to style webpage elements. Most importantly Bootstrap is designed in such a way that makes your website device responsive and that is the main purpose of it. Other alternates for Bootstrap could be - Foundation, Materialize etc. frameworks.

Bootstrap让你从编写大量的CSS代码中解脱出来,它也节省了你在设计网页上花费的时间。

Bootstrap is an open-source CSS, JavaScript framework that was originally developed for twitter application by twitter's team of designers and developers. Then they released it for open-source. Being a longtime user of twitter bootstrap I find that its one of the best for designing mobile ready responsive websites. Many CSS and Javascript plugins are available for designing your website in no time. It's kind of rapid template design framework. Some people complain that the bootstrap CSS files are heavy and take time to load but these claims are made by lazy people. You don't have to keep the complete bootstrap.css in your website. You always have the option to remove the styles for components that you do not need for your website. For example, if you are only using basic components like forms and buttons then you can remove other components like accordions etc from the main CSS file. To start dabbling in bootstrap you can download the basic templates and components from getbootstrap site and let the magic happen.

Bootstrap是开源的HTML框架。几乎所有浏览器都兼容。基本上大屏浏览器的宽度是>992px和特大号1200px。因此,通过使用Bootstrap定义的类,我们可以调整屏幕分辨率,以显示从小手机到大屏幕的每个屏幕上的内容。我尽量简短地解释。 例如:

<div class="col-sm-3">....</div>
<div class="col-sm-9">....</div>

Bootstrap is the world’s most popular and widely used open-source framework for developing with HTML, CSS, and JS. It is a front-end framework of HTML. Bootstrap helps in building responsive websites or web applications and a 12-column grid system that helps dynamically adjust the website to a suitable screen resolution. The current version of bootstrap is 4.3.1 and the bootstrap team has also officially announced Bootstrap 5 version and changes like removing jquery from bootstrap. Some of the crucial reasons why the bootstrap framework is most preferable are

它很容易使用 Bootstrap有很大的社区支持 定制可以很容易地完成 它提高了开发速度 响应性 更多详细信息,请登录官方网站:https://getbootstrap.com/

在进行基于Bootstrap的项目时,建议使用Bootstrap 5管理模板。

来源:https://vmokshagroup.com/blog/bootstrap-advantages/