Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
两篇文章都证明了这一点。
http://www.kyleschaeffer.com/best-practices/css-font-size-em-vs-px-vs-pt-vs/
http://www.maxdesign.com.au/presentation/relative/
我想知道SO用户的看法?
% 和 100 * em (用于设置字体大小)之间的唯一区别是存在一些与使用 em 单位相关的浏览器错误(可以通过显式解决body { font-size: 100%; },然后使用 em 单位。)
body { font-size: 100%; }
坦率地说,kyleschaeffer 的文章是垃圾。它遗漏了一半的事实。
maxdesign 是不错的,但显示了它的年龄。它是在 03 年编写的,它谈到的错误存在于 Opera 6 和 Netscape 4 中——这两个版本都已过时。