好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

当react 项目使用px2rem

参考资料:http://easywork.xin/2018/09/02/react-2/

 

我拿到的设计图 是  375px

 

//配置px2rem

px2rem({remUnit: 37.5})

 

在index.html 加以下的script

<script>document.getElementsByTagName('html')[0].style.fontSize = (document.documentElement.clientWidth || document.body.clientWidth) /10 + 'px';</script>

 

 

查看更多关于当react 项目使用px2rem的详细内容...

  阅读:41次