【发布时间】:2016-02-24 16:36:58
【问题描述】:
我不知道为什么我的字体没有被应用。
我正在尝试为类 font1、font2、font3 应用“Kenyancoffee”字体。
这是我的 HTML 代码:
<content>
<div class="font1">
<p>Text to show up</p>
</div>
</content>
</article>
<article class="middlecontent">
<header>
<h2>
<a href="#" rel="bookmark" title="Permalink to this POST TITLE">Our Product</a>
</h2>
</header>
<content>
<div class="font2">
<p>Text to show up</p>
</div>
</content>
</article>
<article class="bottomcontent">
<header>
<h2>
<a href="#" rel="bookmark" title="Permalink to this POST TITLE">Contact Us</a>
</h2>
</header>
<content>
<div class="font3">
<p>Text to show up</p>
</div>
</content>
<style>
@font-face {
font-family: KenyanCoffeeRg-Regular;
src: url(Madmonkey/kenyancoffee.ttf);
}
.font1, .font2, .font3 {
font-family: KenyanCoffeeRg-Regular;
}
</style>
找错了几个小时。谢谢你的回答。
【问题讨论】: