当前位置: 首页 > 网络学院 > 网页制作基础教程 > CSS > CSS font-size属性
The font-size property sets the size of a font.
font-size属性可设置字体的大小
Inherited: Yes
继承性:有
body { font-size: x-large } p |
值 | 描述 |
---|---|
xx-small x-small small medium large x-large xx-large | Sets the size of the font to different sizes, from xx-small to xx-large 可以从xx-small到xx-large来设置不同大小的字体 |
smaller | Sets the font-size to a smaller size than the parent element 设置比父级元素小一号的字体 |
larger | Sets the font-size to a larger size than the parent element 设置比父级元素大一号的字体 |
length | Sets the font-size to a fixed size 设置固定大小的字体 |
% | Sets the font-size to a % of the parent element 设置以父级元素为基准的百分比字体大小 |