通用场景和方案

尺寸

px, pt, em, %, rem

font-size的几个衡量单位:px,pt,em,%,rem px,pt是固定的尺寸,px多用于屏幕,pt多用于打印。 em和%都是相对的尺寸。不过是相对父元素的,计算起来比较烦。 rem是相对于根html的字体大小的。(有必要写一个转换像素的js呀,不然好麻烦)

概要的介绍 http://www.w3cplus.com/css3/define-font-size-with-css3-rem

介绍em vs. px vs. pt vs.percent http://kyleschaeffer.com/development/css-font-size-em-vs-px-vs-pt-vs/

介绍rem的,写的很赞 http://isux.tencent.com/web-app-rem.html

布局

左固定宽度,右适应:flex

results matching ""

    No results matching ""