https://github.com/amfe/lib-f...css
https://github.com/amfe/lib-f...html
上诉讲到 监听屏幕变化设置html,body FontSize(控制1rem,比例) 这里,flexible,会设置html的fontSize为clientWidth / 10。
也就是 1rem= clientWidth / 10
举个例子:android
375的屏幕,750px的设计图 1rem = 375 / 10 = 37.5px 再经过postcss-pxtorem转换 写代码就是 750px满屏宽度 750px ---> postcss-pxtorem ---> 10rem --->(clientWidth / 10) * 10 PX