【问题标题】:How to correct Chrome wrong text rendering?如何纠正 Chrome 错误的文本渲染?
【发布时间】:2016-12-22 18:53:17
【问题描述】:

我正在开发一个 wordpress 网站,我在主题选项中定义了 hn 标题。例如:h5 有一个 font-weight: 300;。 但是 chrome windows 渲染它错误,它渲染为 font-weight:bold; (在 chrome mac 上没问题)。 我什至尝试通过inspector更改它以查看问题出在哪里,但没有任何改变。

这里有一些图片向您展示尊重:

Chrome Windows(不应该这样)

FireFox Windows(应该如何)

【问题讨论】:

    标签: css wordpress google-chrome frontend


    【解决方案1】:

    请添加代码 sn-p。 我认为你应该使用规范化器 Normalize.css

    【讨论】:

      【解决方案2】:

      尝试为自定义字体粗细添加字体:

      @font-face {
      font-family: Roboto;
      font-weight: 300;
      font-style: normal;
      src: url("Roboto-Light.ttf") format("opentype"); }
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2012-04-29
        • 1970-01-01
        • 2015-02-25
        相关资源
        最近更新 更多