我如何在网站上使用自定义字体? [英] How can I use custom fonts on a website?
本文介绍了我如何在网站上使用自定义字体?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有解决此问题的方法?
解决方案
$ p $
$ p $
@ font-face {
font-family:Thonburi-Bold;
src:url('Thonburi-Bold.ttf'),
url('Thonburi-Bold.eot'); / * IE * /
}
In order for my website to look good I need to use a custom font, specifically, Thonburi-Bold. The problem is - the font does not get displayed unless the user has installed it. It also isn't displayed in firefox.
Is there a workaround to this problem?
解决方案
You have to import the font in your stylesheet like this:
@font-face{
font-family: "Thonburi-Bold";
src: url('Thonburi-Bold.ttf'),
url('Thonburi-Bold.eot'); /* IE */
}
这篇关于我如何在网站上使用自定义字体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文