px2rem

npm i postcss-px2rem
postcss.config.js


module.exports = {
 plugins: {
   autoprefixer: {
    overrideBrowserslist: ['Android 4.1', 'iOS 7.1', 'Chrome > 31', 'ff > 31', 'ie >= 8']
   },
   "postcss-px2rem": {
     remUnit: 36, // 50px = 1rem
     remPrecision: 2 // rem的小数点后位数
   }
 }
}