Created
October 8, 2013 07:33
-
-
Save loo2k/6880985 to your computer and use it in GitHub Desktop.
Revisions
-
loo2k created this gist
Oct 8, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ /* * 1. rem 单位是基于根元素(html)计算大小的 * 2. 几乎所有的浏览器根元素字体大小都是 16px * 3. 将 html 元素的字体大小调整到 10px 方便使用 rem * 4. 采用层叠的方法兼容那些不支持 rem 单位的浏览器 */ html { /* 对应值为 font-size: 10px; */ font-size: 62.5%; } body { /* 兼容不支持 rem 单位的浏览器 */ font-size: 12px; /* 对应的值为 12px */ font-size: 1.2rem; }