我在网上环顾四周,决定使用以下@font-face 实现:
我的 CSS:
@font-face {
font-family: matt;
src: url("/uploads/testing/Interstate-Regular.eot?#iefix") format('embedded-opentype')
url("/uploads/testing/Interstate-Regular.ttf") format('truetype');
}
h5.pleasework {
font-family: matt;
font-size:72px;
}
我的 HTML:
<head>
<link rel="stylesheet" type="text/css" media="all" href="{stylesheet='in-store-analytics/testingStyle'}" />
</head>
<h1> this is a test </h1>
<img src="/uploads/features/featured-block_inthenumbers.png" alt="Smiley face" height="420" width="420">
<img src="/uploads/testing/awesomeness.jpg" alt="Smiley face" height="420" width="420">
<div id="happiness">
<h5 class="pleasework"> PLEASE WORK FOR ME </h5>
</div>
无论出于何种原因,字体都不会生成,但图像会生成,这让我怀疑问题出在 src 参数中的 url 标签上。
有任何想法吗?帮助将不胜感激。
提前致谢!