1.下载插件 npm install postcss-px2rem --save npm i amfe-flexible -S 2.配置 main.js import "amfe-flexible" package.json "postcss": { "plugins": { "autoprefixer": {}, "postcss-px2rem": { "remUnit": 37.5 } } }