我应该在body或html元素上设置默认字体大小吗? [英] Should I set the default font-size on the body or html element?
本文介绍了我应该在body或html元素上设置默认字体大小吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我喜欢在创建网站时在 em
工作。因此,我在正文$ c>上设置了
100.01%
的默认 font-size
$ c>元素。
我的问题是我应该在<$ c $上设置默认值 font-size
c> body 或 html
元素?
现在 rem
code>单元开始变得流行,建议在根元素(html标签)上设置基本字体大小(rem代表根em)。
I like to work in em
s when creating websites. Therefore I set a default font-size
of 100.01%
on the body
element.
My question is should I set the default font-size
on the body
or the html
element? What are the pros and cons (if any) of both?
解决方案
Now that the rem
unit is starting to become popular, setting the base font-size on the root element (html tag) is advised (rem stands for root em).
这篇关于我应该在body或html元素上设置默认字体大小吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文