【发布时间】:2012-04-16 10:05:11
【问题描述】:
这是最奇怪的事情。我们在上面的页面上使用了两种网络字体及其不同的权重:Benton Sans 和 Jubilat,这两种字体我们都有许可证。 h2(“有兴趣加入 Miche 吗?”“已经是 Miche 代表?”)设置为 Jubilat Regular,并在 Firefox 中正确显示;但是,h1(“欢迎!”)是 Jubilat Light,并显示为 Times New Roman。
这两个权重都是用 Font Squirrel 生成的。 两者都托管在同一台服务器上。 两者的编码方式相同。 我已经重新上传了文件。 我试过如果 IE 所以 FF 不尝试使用 .eot。 在你说之前:是的,我已经尝试过 Bulletproof。
为什么在 Light 不显示时显示 Regular?我想知道我是否只是没有使用正确的 CSS 组合。
@font-face {
font-family: 'JubilatLight';
src: url('https://bc.miche.com/FileUploads/CMS/Documents/jubilatlightwebfont.eot');
src: url('https://bc.miche.com/FileUploads/CMS/Documents/jubilatlightwebfont.eot?#iefix') format('embedded-opentype'),
url('https://bc.miche.com/FileUploads/CMS/Documents/jubilatlightwebfont.woff') format('woff'),
url('https://bc.miche.com/FileUploads/CMS/Documents/jubilatlightwebfont.ttf') format('truetype'),
url('https://bc.miche.com/FileUploads/CMS/Documents/jubilatlightwebfont.svg#JubilatLight') format('svg');
font-weight: normal;
font-style: normal;
}
#main-container h1.jubilat {
font-family: "JubilatLight";
font-weight: normal;
font-size: 40px;
color: #701271;
text-align: center;
}
【问题讨论】:
-
请注意:我想通了,但 Stack 不会让我在提出问题 6 小时后发布我的答案,因为我没有 100 个代表,显然......很有意义。
-
这有帮助,但给我留下了一个问题:我不能用绝对 URL 来做到这一点吗?乐叹息
-
用绝对链接试试,在 Firefox 中测试。如果它不起作用,你就会知道它需要是相对的。不知道为什么会这样。
标签: html css firefox font-face