postcss + autoprefixer使用

2021-08-12  本文已影响0人  浅浅_2d5a

PostCSS 是一个使用 JS 插件转换样式的工具,里面有解析器,能够使用autoprefixer等插件,处理css。
Autoprefixer 插件在PostCSS中最流行。
Autoprefixer :添加供应商前缀,使用来自Can I Use 的数据
vue-cli4中使用postcss-loader进行解析:
1、不需要安装postcss-loader 和 autoprefixer
2、直接配置vue.config.js 中的css部分的postcss


294e23f8e74c29b59418e9b4db89c08.png

browserslist部分
3、本地服务打开也有 厂商前缀,打包后dist中的css 也有厂商前缀

上一篇 下一篇

猜你喜欢

热点阅读