【发布时间】:2015-01-14 06:01:29
【问题描述】:
最近我在我的网站上使用了自定义字体。将其上传到服务器后,我只能在 Google Chrome 中查看字体。在 Firefox 和 IE 中,字体切换回 Times New Romans。但是,上传到其他服务器后,FF和Chrome都可以查看,但IE还是不能。有什么办法可以保证所有浏览器都能使用该字体?
【问题讨论】:
标签: google-chrome internet-explorer firefox fonts
最近我在我的网站上使用了自定义字体。将其上传到服务器后,我只能在 Google Chrome 中查看字体。在 Firefox 和 IE 中,字体切换回 Times New Romans。但是,上传到其他服务器后,FF和Chrome都可以查看,但IE还是不能。有什么办法可以保证所有浏览器都能使用该字体?
【问题讨论】:
标签: google-chrome internet-explorer firefox fonts
Make sure your @font-face rule like below
@font-face {
font-family: "Calibri";
src: url('fonts/calibri_2.eot');
src: url('fonts/calibri_2.eot?#iefix') format('embedded-opentype'),
url('fonts/calibri_2.svg#Calibri') format('svg'),
url('fonts/calibri_2.woff') format('woff'),
url('fonts/calibri_2.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
【讨论】: