我确信我不是唯一一个困扰这个问题的人,但我似乎无法找到解决方案。
@font-face
在带有 TTF 字体的 Firefox、Chrome、Safari 中运行良好。
像这样:
@font-face{
font-family: "Apple-Chancery" ;
src: url(images/Apple-Chancery.ttf ) format("truetype");
}
但是,我知道要在 Microsoft 中使用,字体必须是 EOT 格式,所以我使用http://ttf2eot.sebastiankippe.com/对其进行了转换
我的代码如下所示:
@font-face{
font-family: "Apple-Chancery" ;
src: local("Apple Chancery"), url(images/Apple-Chancery.eot), url(images/Apple-Chancery.ttf ) format("truetype"); /* non-IE */
}
但它在 Internet Explorer 中不起作用。我已经尝试为:添加两条不同的线src
:我尝试使用不同的转换器、不同的字体,但都没有成功。我正在使用 IE8。
另外,要使用多种自定义字体,我需要多个@font-face
块还是使用将它们排列起来font-family
, src
, font-family
,src
等?