:CSS中的font-佳作欣赏免费ppt模版下载-道格办公

CSS中的font

ine-height 、font-family 例如: font: italic small-caps bold 12px/1.5 "Times New Roman", serif; 这个例子设置了字体的样式为斜体、小型大写字母、粗体,字体大小为12像素,行高为1.5倍字体大小,字体系列为"Times New Roman",备选字体系列为serif。

font 简写属性在一个声明中设置所有字体属性。

顺序是:font-style 、font-variant、 font-weight 、font-size/line-height 、font-family

其中:font-size和font-family的值是必需的。要是缺少了其他值,默认值将被插入,如果有默认值的话。

例如:

span {
    font: italic bold 12px/30px Georgia, serif;
}

font-style

设置字体样式

参数:

normal默认值,浏览器显示的

italic斜体

oblique倾斜

inherit继承父元素字体样式

span {
    font-style: italic;
}

font-variant

小写转大写字母

参数:

normal默认值

small-caps小写转大写

inherit继承父元素

font-weight

字体粗细

参数:

normal默认

bold粗体

bolder更粗

lighter 100 - 900 其中400 等同于 normal,而 700 等同于 bold

inherit继承父元素

font-size

字体大小

font-family

定义一个元素的字体

文章为用户上传,仅供非商业浏览。发布者:Lomu,转转请注明出处: https://www.daogebangong.com/articles/detail/fonts%20in%20CSS.html

(810)
打赏 支付宝扫一扫 支付宝扫一扫
single-end

相关推荐