将正文字体大小设置为62.5%,以便于em转换
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了将正文字体大小设置为62.5%,以便于em转换相关的知识,希望对你有一定的参考价值。
If you would like to use relative units (em) for your font sizes, declaring 62.5% for the font-size property of the body will make it easier to convert px to em. By doing it this way, converting to em is a matter of dividing the px value by 10 (e.g. 24px = 2.4em).
body { font-size: 62.5%; /* font-size 1em = 10px */ } p { font-size: 1.2em; /* 1.2em = 12px */ }
以上是关于将正文字体大小设置为62.5%,以便于em转换的主要内容,如果未能解决你的问题,请参考以下文章