CSS3新增的伺服器字型

2022-08-13 09:39:16 字數 495 閱讀 1819

1、使用伺服器字型

使用伺服器字型非常簡單,只要使用@font-face定義伺服器字型即可。格式如下:

@font-face{

font-family:name;

src:url(url) format(font-format);   

到目前為止,伺服器字型還只支援truetype格式和opentype格式。

2、定義粗體字和斜體字

@font-face{

font-family:crazyit;

src:url("delicious-bold.otf") format("opentype");   

font-weight:bold;      

3、優先使用客戶端字型

@font-face{

font-family:crazyit;

src:local("goudy stout"), url("blazed.ttf") format("truetype");   

linux伺服器新增字型

1.在window伺服器下查詢相應字型 2.將檔案改名並且放入相應位置 mkdir p usr share fonts chinese truetype cd usr share fonts chinese truetype mv root simsun.ttc simsun.ttf 此處需要先將檔...

css3 選擇器 CSS3新增偽類

css3新增偽類 我們來盤點一下css3新增了哪些偽類?a first of type 選擇器匹配屬於其父元素的特定型別的首個子元素的每個元素。b last of type 選擇器匹配屬於其父元素的特定型別的最後乙個子元素的每個元素。c only of type 選擇器匹配屬於其父元素的特定型別的唯...

linux伺服器新增新字型

1.在window伺服器下查詢相應字型 2.將檔案改名並且放入相應位置 mkdir p usr share fonts chinese truetype cd usr share fonts chinese truetype mv root simsun.ttc simsun.ttf 此處需要先將檔...