Html 在 div 中设置 h1 样式
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19766401/
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
style h1 inside a div
提问by user2952265
采纳答案by álvaro González
font-style
has nothing to do with bold:
font-style
有无关大胆:
The font-style CSS property allows italic or oblique faces to be selected within a font-family.
font-style CSS 属性允许在字体系列中选择斜体或斜面。
You want font-weight
instead:
The font-weight CSS property specifies the weight or boldness of the font. However, some fonts are not available in all weights; some are available only on normal and bold.
font-weight CSS 属性指定字体的粗细。但是,某些字体并非适用于所有粗细;有些仅在正常和粗体上可用。
回答by melancia
You need font-weight
:
你需要font-weight
:
.header h1{
color: grey;
font-weight: normal;
}