gpt4 book ai didi

html - 如何将 html 正文标签的 16 px 设为 62.5%,以便 px 到 em 的转换变得更容易?

转载 作者:行者123 更新时间:2023-11-28 01:24:51 28 4
gpt4 key购买 nike

我在 Quora 上阅读了以下内容:

By setting the font-size of the (which by default its 16px) to 62.5%, setting em based font-sizes for the rest of the page becomes very simple. just divide the intended pixel size by 10 to get the equivalent size in ems.

10px = 1.0 em 11px = 1.1em 12px = 1.2em

这是如何工作的,我该如何实现?

最佳答案

这是我用的。

html { font-size: 62.5%; }

关于html - 如何将 html 正文标签的 16 px 设为 62.5%,以便 px 到 em 的转换变得更容易?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32533490/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com