参考资料: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>
 

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-04
  • 2022-12-23
  • 2018-12-07
  • 2021-07-24
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案