font-size:62.5% vs. font-size:10px

前端 未结 2 1974
南方客
南方客 2020-12-13 19:52

For a long time I\'ve been using

body {font-size:62.5%;}

in CSS documents since it\'s supposed to

2条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-13 20:36

    You could just use:

    html {font-size:10px}
    

    So know you can work just with rem or em without complex calculations: 1 rem = 10px 2 rem = 20px

提交回复
热议问题