2 回答

TA貢獻(xiàn)1829條經(jīng)驗(yàn) 獲得超13個(gè)贊
1.將雅黑字體的格式轉(zhuǎn)成eot,woff,ttf,svg四種格式,工具使用fonts2u,將這四個(gè)字體保存到你的fonts文件夾里面
2.使用@font-face,格式
@font-face {
font-family: "DIY-FontName";
src:url('../fonts/quicksand-book.eot');
src:url('../fonts/quicksand-book.eot?#iefix') format('embedded-opentype'),
url('../fonts/quicksand-book.woff') format('woff'),
url('../fonts/quicksand-book.ttf') format('truetype'),
url('../fonts/quicksand-book.svg#flexslider-icon') format('svg');
font-weight: normal;
font-style: normal;
}
將里面的url部分改成你1上面保存的字體的路徑;
1在你的css中css body { font-family: "DIY-FontName"; }即可。
- 2 回答
- 0 關(guān)注
- 2160 瀏覽
添加回答
舉報(bào)