字体适用于IE,但不适用于Firefox或Chrome
问题描述:
我遇到了在我正在制作的网站中显示字体的问题。我正在使用字体ErasITC Light。相关的HTML是:字体适用于IE,但不适用于Firefox或Chrome
<div class="heading">
<div class="container-fluid">
<h1>make your voice heard</h1>
<h2>it's time to let the people speak out</h2>
</div>
相关的CSS是:
.heading h1{
font-family: ErasITC, Eras Light ITC, sans-serif;
color: #ffffff;
font-size: 6.25vw;
font-weight: 300;
text-shadow: 2px 2px 15px black;
text-align:center;
margin-top: 21vh;
}
.heading h2{
font-family: ErasITC, Eras Light ITC, sans-serif;
color: #ffffff;
font-size: 2.7vw;
font-weight: 300;
text-shadow: 2px 2px 10px black;
text-align:center;
}
这在IE,但不能在Chrome或Firefox,它会显示默认的sans-serif字体。
注意:我为某些元素使用引导程序。
谢谢,
Geffen Avraham。
答
当您正在使用的空格的字体名,你必须把它们放在引号,像这样:
font-family: "Eras ITC", "Eras Light ITC", Sans-Serif;
+1
缺少双引号,它应该像{font-family:“Eras ITC”,“Eras Light ITC”,sans -serif;} –
+0
哇。谢谢。我看到你指示我的问题,但没有注意到引用。你知道为什么Internet Explorer正确显示字体,即使我没有编程它的权利? – TeslaK20
检查这个问题http://stackoverflow.com/questions/23608504/css-code- for-eras-light-itc – Panther
{font-family:“Eras ITC”,“Eras Light ITC”,sans-serif;}? – naveen
你是否将你的字体声明为'@ font-face'?你能发布代码吗? – Ciprian