【问题标题】:transition with -webkit- transform in shorthand rule在速记规则中使用 -webkit- 转换的转换
【发布时间】:2016-01-21 04:07:22
【问题描述】:

我对 postcss 运行 autoprefixer 和代码感到不满:

transition: transform .3s, color .3s;

...正在输出:

transition: color .3s, -webkit-transform .3s;
transition: transform .3s, color .3s;
transition: transform .3s, color .3s, -webkit-transform .3s;

但它不应该输出这个吗?

-webkit-transition: -webkit-transform .3s, color .3s;
transition: transform .3s, color .3s;

我的 postcss 设置是:

postcss: {
    options: {
        map: {
            inline: false, // save all sourcemaps as separate files...
            annotation: '../css/' // ...to the specified directory
        },

        processors: [
            require('autoprefixer')({browsers: 'last 2 versions'}), // add vendor prefixes
        ]
    },
    dist: {
        src: '../css/*.css'
    }
}

我不知道我是否做错了什么,是否输出不正确,或者它实际上是否正确。

谢谢

【问题讨论】:

    标签: css vendor-prefix autoprefixer postcss


    【解决方案1】:

    你写了正确的css,这不是你的错,你也可以在他们的official page上检查你的css, 并且根据您的浏览器选择设置 {browsers: 'last 2 versions'} 您不需要最后 2 个 webkit 版本的任何转换前缀,生成的 css 是正确的。

    【讨论】:

      猜你喜欢
      • 2015-07-25
      • 1970-01-01
      • 2017-08-20
      • 2016-08-10
      • 2017-09-22
      • 2013-04-10
      • 1970-01-01
      • 2018-10-05
      • 1970-01-01
      相关资源
      最近更新 更多