: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< /span>/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/zh-Hant/articles/detail/fonts%20in%20CSS.html

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

相關推薦