<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport"
        content="viewport-fit=cover,width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>Document</title>
</head>
<style>
    html {
        line-height: 1.15;
        /* 1 */
        -webkit-text-size-adjust: 100%;
        /* 2 */
        font-size: 13.33333vw;  /*这个是比较重要的*/
        /* 用这个vw */
        font-family: '微软雅黑', 'PingFangSC-Regular';
    }
    div{
        font-size: .2rem;
    }
</style>

<body>
<div>哈哈</div>
</body>

</html>

 

按照750的设计稿,如果是75px则直接写成0.75rem即可。

相关文章:

  • 2021-07-08
  • 2021-09-07
  • 2021-07-17
  • 2021-08-19
  • 2021-09-02
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-05-02
  • 2022-02-05
  • 2020-06-08
  • 2021-10-03
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案