我在制作的网站中显示的字体有问题。我正在使用字体ErasITC Light。相关的HTML是:
<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;
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句