【发布时间】:2013-10-04 03:55:23
【问题描述】:
相关网站链接:http://qbtei.com/nationalretail/public
在我的 fonts.css 中,我正在加载一堆像这样的字体:
@font-face {
font-family: GothamBook;
src: url('../fonts/Gotham-Book.otf');
src: url( ../fonts/Gotham-Book.otf ); /* IE */
}
@font-face {
font-family: GothamBookItalic;
src: url('../fonts/gothambookitalic.otf');
src: url( ../fonts/gothambookitalic.otf ); /* IE */
}
@font-face {
font-family: GothamBold;
src: url('../fonts/gothambold.otf');
src: url( ../fonts/gothambold.otf ); /* IE */
}
在 Firefox/chrome 中,这些字体没有问题,但在 IE 10 中,当我检查元素时,此 css 文件显示为空且未加载字体
我尝试使用 http://www.fontsquirrel.com/tools/webfont-generator 创建一个新的字体 css 表,看起来像这样,但这最终在 firefox、chrome 或 Internet Explorer 中都不起作用
@font-face {
font-family: 'gotham_boldregular';
src: url('gothambold-webfont.eot');
src: url('gothambold-webfont.eot?#iefix') format('embedded-opentype'),
url('gothambold-webfont.woff') format('woff'),
url('gothambold-webfont.ttf') format('truetype'),
url('gothambold-webfont.svg#gotham_boldregular') format('svg');
font-weight: normal;
font-style: normal;
}
我在 css 中这样使用我的字体:
.nav-text{
font-family: GothamLight;
font-size: 21px;
color: #d9e3e9;
font-weight: 100;
position: absolute;
right: 28px;
top: 13px;
}
【问题讨论】:
-
我猜你有这个,但只是为了仔细检查你的网站是否包含 DOCTYPE?即
-
是的,我必须仔细检查一下
-
好吧,我就是这么想的。如果您使用开发者工具(F12 键)并将浏览器模式更改为 IE 8 或 9,图像会加载吗?
-
如果我在 IE 10 兼容模式下运行它会加载一些字体,但网站的其余部分会爆炸
-
嗯。每个字体需要两次相同的 src 吗?
标签: css internet-explorer fonts font-face