我刚开始一个使用 Twitter Bootstrap 的项目,想知道它是否有自己的重置规则。
通常我会添加一份 normalize 样式表来帮助我的网站在不同浏览器下看起来更加一致,但是在使用 Bootstrap 的情况下是否需要呢?
我刚开始一个使用 Twitter Bootstrap 的项目,想知道它是否有自己的重置规则。
通常我会添加一份 normalize 样式表来帮助我的网站在不同浏览器下看起来更加一致,但是在使用 Bootstrap 的情况下是否需要呢?
Bootstrap已经使用了normalize.css。请查看源代码(以及LESS文件):
/*!
* Bootstrap v2.2.2
*
* Copyright 2012 Twitter, Inc
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Designed and built with all the love in the world @twitter by @mdo and @fat.
*/
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
nav,
section {
display: block;
}
Bootstrap v3现在明确指出了这一点,并且还包括版本号:
/*!
* Bootstrap v3.0.3 (http://getbootstrap.com)
* Copyright 2013 Twitter, Inc.
* Licensed under http://www.apache.org/licenses/LICENSE-2.0
*/
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
nav,
section,
summary {
display: block;
}