第6章:字体

6.2 字体尺寸:font-size属性

不同字体的实际尺寸

This property describes the size of the font when set solid.

This property describes the size of the font when set solid.

This property describes the size of the font when set solid.

6.2.2 绝对尺寸

绝对尺寸font-size:xx-small

绝对尺寸font-size:x-small

绝对尺寸font-size:small

绝对尺寸font-size:medium

绝对尺寸font-size:large

绝对尺寸font-size:x-large

绝对尺寸font-size:xx-large

6.2.3 相对尺寸

p元素font-size:medium,larger 比父元素的尺寸大

p元素font-size:medium,smaller 比父元素的尺寸小

p元素font-size:medium,span为larger,em也为larger

p元素font-size:14px,span为larger,em也为larger

6.2.4 百分比和em

段落12px,字font-size:140%等于字font-size:1.4em

6.2.5 尺寸的继承与浏览器的显示

p 12px*140% = 16.8px,span 继承16.8px,而不是140%

字24px,字24.4px,字24.5px,字25px

p 12px*140%=16.8px,strong 16.8px*120%=20.16px,em 20.16px*130%=26.208px

返回代码目录