vue-cli3添加lib-flexible

首先須要安裝lib-flexible依賴包
npm install lib-flexible -savecss

而後在postcss.config.js文件中添加以下代碼
module.exports = {
plugins: {npm

autoprefixer: {},
"postcss-px2rem": {
  remUnit: 75 //轉換爲rem的基準px
  //其餘配置選項自行查文檔
}

}
}post

注:remUnit值是設定的基本換算單位flex

相關文章
相關標籤/搜索