在 bootstrap.css 中更改段落字体大小
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19796702/
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
Change paragraph font size in bootstrap.css
提问by user1144596
we are using bootstrap v2 CSS and we want to increase the font size by a point or two globally. i wanted to know if this was a simple change in the CSS file or more complicated than that.
我们正在使用 bootstrap v2 CSS,我们希望在全局范围内将字体大小增加一两个点。我想知道这是否是 CSS 文件中的简单更改或更复杂。
i tried and looked into the CSS but it's complicated to me and i am afraid of breaking something else. Can someone possibly help with this.
我尝试并查看了 CSS,但它对我来说很复杂,而且我害怕破坏其他东西。有人可以帮忙解决这个问题。
回答by Jeffrey Kevin Pry
If you add:
如果添加:
<style type="text/css">
p {
font-size: 16px;
}
</style>
to your HTML file (in the header) you're all set.
到您的 HTML 文件(在标题中),您已准备就绪。
If that doesn't provide the desired results, add font-size: 16px !important;
instead.
如果这不能提供所需的结果,请font-size: 16px !important;
改为添加。
Important will tell the browser your CSS file is more important than Bootstrap's and it should use yours instead.
重要会告诉浏览器你的 CSS 文件比 Bootstrap 的更重要,它应该使用你的。
Just make sure your CSS file or section (like above) is added after the Bootstrap CSS reference.
只需确保在 Bootstrap CSS 参考之后添加您的 CSS 文件或部分(如上)。