首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >@ IE7忽略字体

@ IE7忽略字体
EN

Stack Overflow用户
提问于 2011-04-07 05:53:35
回答 4查看 19.7K关注 0票数 8

我使用字体松鼠创建了@字体面css规则和所有字体格式,并且在我测试过的所有浏览器上运行良好,但在IE7上没有。字体似乎根本没有加载。

您可以在http://grupogamma.socialsnack.com/现场看到该网站。

@字体规则在http://grupogamma.socialsnack.com/wp-content/themes/gamma/style.css上,字体在http://grupogamma.socialsnack.com/fonts/

我的css片段是由松鼠字体生成的:

代码语言:javascript
复制
@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。因此,将加载字体,但只是没有正确地使用/未正确呈现。

EN

回答 4

Stack Overflow用户

回答已采纳

发布于 2011-05-29 21:12:23

在我的css中似乎还有什么东西让IE7表现得很糟糕(令人震惊!)

谢天谢地,使用一些魔法仙尘(变焦: 1)解决了这个问题。

票数 8
EN

Stack Overflow用户

发布于 2013-02-27 09:33:02

我刚才使用的方法是IE7和IE8。是的..。与“多浏览器”的声明方式相比,IE7的字体面声明是不同的,但更简单。这是我的例子。我在“字体”文件夹中添加了字体,这样您就可以看到一些“字体/.”在密码里加了。

代码语言:javascript
复制
/* 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; 
           }
票数 3
EN

Stack Overflow用户

发布于 2011-04-07 05:58:51

我很确定这是一个简单的问题,"IE7不要那样做,“正如孩子们说的。Sitepoint在@font-face上的引用(在http://reference.sitepoint.com/css/at-fontface上找到)表明IE只通过@font-face支持某些字体格式。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/5576616

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档