是否可以使用字体速记属性而不更改字体来调整
,像这样:h1
到h6
的默认浏览器字体属性-size
h1, h2, h3, h4, h5, h6 { font:400 normal/1.2 rockwell,sans-serif; }
我想替代方案是不使用速记(如下所示),但如果可能的话,我会很高兴知道。
h1, h2, h3, h4, h5, h6 {
font-weight:400;
line-height:1.2;
font-family:rockwell,sans-serif;
}
最佳答案
不,根据这个 (http://www.w3schools.com/cssref/pr_font_font.asp):
The font shorthand property sets all the font properties in one declaration.
The properties that can be set, are (in order): "font-style font-variant font-weight font-size/line-height font-family"
The font-size and font-family values are required. If one of the other values are missing, the default values will be inserted, if any.
关于css - 使用字体速记属性设置其他字体属性时,保持多个标题的浏览器默认字体大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7950211/