31

【基础】EM 还是 REM?这是一个问题!-JavaScript

 6 years ago
source link: http://blog.51cto.com/12917919/2105756
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
应用象`EM` 和 `REM`这种相对长度单位进行页面排版是WEB开发中的最佳实践。在页面排版中较好应用`EM` 和 `REM`,根据设备尺寸缩放显示元素的大小。这就使得组件在不同设备上都达到最佳的显示效果成为可能。但问题是究竟该用 `EM` 还是 `REM` 呢?关于这个问题一直存在比较大的争议。本文将会给大家介绍究竟什么是 `EM` 和 `REM` 和如何进行两者的选择,以及结合两者优势构建模块化的WEB组件。

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK