gpt4 book ai didi

html - 为什么 normalize.css 不设置字体样式 : italic for and tags?

转载 作者:太空狗 更新时间:2023-10-29 14:23:38 24 4
gpt4 key购买 nike

normalize.cssfont-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/

24 4 0