在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/HTML5/ css3引用字體的問題

css3引用字體的問題

@font-face {
    font-family: 'HansHandItalic';
    src: url('fonts/hanshand-webfont.eot');
    src: url('fonts/hanshand-webfont.eot?#iefix') format('embedded-opentype'),
         url('fonts/hanshand-webfont.woff') format('woff'),
         url('fonts/hanshand-webfont.ttf') format('truetype'),
         url('fonts/hanshand-webfont.svg#webfont34M5alKg') format('svg');
    font-weight: normal;
    font-style: normal;
}

這是比較完全引用外部字體的寫法,小白有兩個不懂的地方。

1、為何 src: url('fonts/hanshand-webfont.eot'); 要單獨寫出來,而不寫在下面路徑一起?

2、format是啥意思?

回答
編輯回答
忠妾

url('fonts/hanshand-webfont.eot'); 是ie9的寫法,
url('fonts/hanshand-webfont.eot?#iefix') format('embedded-opentype'); 是ie6-8的寫法,
分開寫是為了好區(qū)別,當(dāng)然你也可以寫在一起。
format 是指你引用的字體格式,主要類型有truetype,opentype,truetype-aat,embedded-opentype,avg等

2017年3月1日 04:39
編輯回答
笨笨噠

找了篇文檔

2017年10月25日 23:12