设为首页 - 加入收藏 ASP站长网(Aspzz.Cn)- 科技、建站、经验、云计算、5G、大数据,站长网!
热搜: 创业者 数据 手机
当前位置: 首页 > 运营中心 > 网站设计 > 正文

html – 为什么normalize.css没有设置font-style:italic for和t

发布时间:2021-05-15 20:06 所属栏目:12 来源:网络整理
导读:normalize.css设置font-weight:bold;对于 b和 strong标签. 我希望它有字体样式:斜体;对于 i和 em,但是它指定了font-style:italic;仅适用于 dfn标签. https://github.com/necolas/normalize.css/blob/master/normalize.css#l118-l129 b,strong { font-weig

normalize.css设置font-weight:bold;对于< b>和< strong>标签.

我希望它有字体样式:斜体;对于< 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.如非minfied文件中所述:

/**
 * Address style set to `bolder` in Firefox 4+,Safari,and Chrome.
 */

(编辑:ASP站长网)

    网友评论
    推荐文章
      热点阅读