我使用字体松鼠创建了@字体面css规则和所有字体格式,并且在我测试过的所有浏览器上运行良好,但在IE7上没有。字体似乎根本没有加载。
您可以在http://grupogamma.socialsnack.com/现场看到该网站。
@字体规则在http://grupogamma.socialsnack.com/wp-content/themes/gamma/style.css上,字体在http://grupogamma.socialsnack.com/fonts/上
我的css片段是由松鼠字体生成的:
@font-face {
font-family: 'UniversCondensedLight';
src: url('/fonts/univers-condensedlight-webfont.eot');
src: url('/fonts/univers-condensedlight-webfont.eot?#iefix') format('eot'),
url('/fonts/univers-condensedlight-webfont.woff') format('woff'),
url('/fonts/univers-condensedlight-webfont.ttf') format('truetype'),
url('/fonts/univers-condensedlight-webfont.svg#webfonteM3WTEhs') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'UniversCondensed';
src: url('/fonts/univers-condensed-webfont.eot');
src: url('/fonts/univers-condensed-webfont.eot?#iefix') format('eot'),
url('/fonts/univers-condensed-webfont.woff') format('woff'),
url('/fonts/univers-condensed-webfont.ttf') format('truetype'),
url('/fonts/univers-condensed-webfont.svg#webfontPDfnu2z9') format('svg');
font-weight: normal;
font-style: normal;
}编辑:
通过使用Wireshark,我能够验证字体.eot确实已加载,并返回一个200 OK。内容类型是application/vnd.ms-fontobject。因此,将加载字体,但只是没有正确地使用/未正确呈现。
发布于 2011-05-29 21:12:23
在我的css中似乎还有什么东西让IE7表现得很糟糕(令人震惊!)
谢天谢地,使用一些魔法仙尘(变焦: 1)解决了这个问题。
发布于 2013-02-27 09:33:02
我刚才使用的方法是IE7和IE8。是的..。与“多浏览器”的声明方式相比,IE7的字体面声明是不同的,但更简单。这是我的例子。我在“字体”文件夹中添加了字体,这样您就可以看到一些“字体/.”在密码里加了。
/* declaration of custom fontfaces */
/* first set of declaration fixes IE < v.9 issue */
@font-face {
font-family:"Open Sans Light";
src:url("fonts/OpenSans-Light.eot?");
}
/* if your browser is one of the latest ones, then it will recognize the code
below and will redeclare the font faces.
Since IE 7 and 8 do not recognize these declarations,
they will just bypass them. */
@font-face {
font-family:"Open Sans Light";
src:url("fonts/OpenSans-Light.eot?") format("eot"),
url("fonts/OpenSans-Light.woff") format("woff"),
url("fonts/OpenSans-Light.ttf") format("truetype"),
url("fonts/OpenSans-Light.svg#OpenSans-Light") format("svg");
font-weight:normal;font-style:normal;
}发布于 2011-04-07 05:58:51
我很确定这是一个简单的问题,"IE7不要那样做,“正如孩子们说的。Sitepoint在@font-face上的引用(在http://reference.sitepoint.com/css/at-fontface上找到)表明IE只通过@font-face支持某些字体格式。
https://stackoverflow.com/questions/5576616
复制相似问题