postcss-pxtorem 配置

postcss-pxtorem 用于自动帮助将px转换成rem,所以在编写代码时候,直接按照设计图px即可

module.exports = {
  plugins: {
    autoprefixer: {},
    'postcss-pxtorem': {
      rootValue: 100, // 根元素字体大小
      // propList: ['width', 'height']
      propList: ['*']
    }
  }
}

  

posted @ 2020-09-30 15:39  凉城i  阅读(3263)  评论(0编辑  收藏  举报