【问题标题】:Why Autoprefixer doesn't add prefix for font-smoothing为什么 Autoprefixer 不为字体平滑添加前缀
【发布时间】:2017-02-02 07:09:57
【问题描述】:

Autoprefixer webpack 加载器为所有 css 添加自动前缀,但它不会为font-smoothing : antialiased 添加自动前缀。

为什么不为此添加自动前缀?

【问题讨论】:

    标签: webpack autoprefixer


    【解决方案1】:

    我猜是因为它是供应商 (-webkit-) 特定属性。所以这个属性没有其他前缀。你也可以在推特上看到一些讨论:https://twitter.com/autoprefixer/status/444429500789841921?lang=nl

    找到另一个解释用法的网站: https://davidwalsh.name/font-smoothing

    TL;DR:

    对于其他供应商,您甚至需要其他设置(抗锯齿和灰度)

    .element {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-01-05
      • 2020-04-11
      • 2016-01-07
      • 2017-07-23
      • 1970-01-01
      相关资源
      最近更新 更多