umi项目如何使用 pxToViewPort

 

2、安装依赖

"postcss-px-to-viewport": "^1.1.1"
 
1、.umirc.ts
import pxToViewPort from 'postcss-px-to-viewport';
3、
extraPostCSSPlugins: [
pxToViewPort({
viewportWidth: 750,
viewportHeight: 1334,
unitPrecision: 3,
viewportUnit: 'vw',
selectorBlackList: ['node_modules', '.hairlines', '.am-'],
minPixelValue: 1,
mediaQuery: false,
}),
],
 

posted on 2021-12-22 13:42  漫思  阅读(207)  评论(0编辑  收藏  举报

导航