1、npm i amfe-flexible
2、import 'amfe-flexible'
然后再,安装postcss-px2rem插件
npm i postcss-px2rem
在package.json中配置
"postcss": {
"plugins": {
"autoprefixer": {},
"postcss-px2rem": {
"remUnit": 26.7 } } }
1、npm i amfe-flexible
2、import 'amfe-flexible'
然后再,安装postcss-px2rem插件
npm i postcss-px2rem
在package.json中配置
"postcss": {
"plugins": {
"autoprefixer": {},
"postcss-px2rem": {
"remUnit": 26.7 } } }