我不明白这是怎么回事? Google Chrome 给这个“CSS 无效的属性值”。
<h2 class="grid-100" style="font: 'ralewaybold' 35px !important"><span>Portee</span> Goods</h2>
如何解决?
最佳答案
您的 Font Shorthand 属性无效
字体 CSS 属性是一个速记属性,用于设置font-style
、font-variant
、 font-weight
、font-size
、line-height
和 font-family
,或者一种设置元素
font
到系统字体,使用特定 关键字。
语法
h2{
font: font-style font-variant font-weight font-size/line-height font-family;
}
正在使用
h2{
font: italic small-caps normal 13px/150% Arial, Helvetica, sans-serif;
}
More about the shorthand font perperty
或者习惯了
/*尺寸|家人 */
font: 2em "Open Sans", sans-serif;
/* 样式 |尺码 |家人 */
font: italic 2em "Open Sans", sans-serif;
/* 样式 |变体 |重量 |大小/行高 |家人 */
font: italic small-caps bolder 16px/3 cursive;
/* 系统对话框中使用的字体 */
font: message-box;
/* 全局值 */
font: inherit;
font: initial;
font: unset;
关于html - CSS 无效属性值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32515519/