normalize.css
套font-weight: bold;
对于 <b>
和 <strong>
标签。
我希望它有 font-style: italic;
对于 <i>
和 <em>
, 但是它指定了 font-style: italic;
仅适用于 <dfn>
标签。
https://github.com/necolas/normalize.css/blob/master/normalize.css#l118-l129
b,
strong {
font-weight: bold;
}
dfn {
font-style: italic;
}
这有什么特别的原因吗?
最佳答案
<i>
和 <em>
无论您使用何种浏览器,标签始终为斜体。
归一化调整:
b,
strong {
font-weight: bold;
}
因为有些浏览器选择显示<b>
和 <strong>
与 font-weight: bolder
而不是 font-weight: bold
.如非压缩文件中所述:
/**
* Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
*/
关于html - 为什么 normalize.css 不设置字体样式 : italic for <i> and <em> tags?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31671006/