【问题标题】:Is text-rendering allowed in @font-face declaration?@font-face 声明中是否允许文本渲染?
【发布时间】:2017-07-19 16:42:54
【问题描述】:

我偶然发现了一个用于 webfont 集成的 CSS 文件,其中 text-rendering 属性在 @font-face 内部使用:

@font-face {
  font-family: "Font Name";
  /** ... */
  text-rendering: optimizeLegibility;
}

我的 IDE 告诉我这是不正确的用法,它是根据 MDN。这是 CSS 作者的错误还是涉及某些浏览器差异?

【问题讨论】:

    标签: css fonts font-face text-rendering


    【解决方案1】:

    这可能是作者的错误。 text-rendering 是一个属性,而不是 @font-face 描述符。此外,它是 text 属性,而不是 font 属性。这是两个不同类别的属性。

    【讨论】:

      猜你喜欢
      • 2012-01-24
      • 2011-09-14
      • 1970-01-01
      • 1970-01-01
      • 2014-09-15
      • 2011-08-20
      • 1970-01-01
      • 2016-07-06
      • 2013-08-21
      相关资源
      最近更新 更多