我刚刚测试了一个在IE6中使用@ font-face的网站。最初,它可以工作并且替换了字体。然后,当我再次对其进行测试时,@ font-face已完全停止工作,并且找不到任何原因。

我正在使用的css是

@font-face {
    font-family: 'SegoeCondensedBold';
    src: url('../Fonts/segoecbd-webfont.eot');
    src: url('../Fonts/segoecbd-webfont.eot?#iefix') format('embedded-opentype'),
         url('../Fonts/segoecbd-webfont.woff') format('woff'),
         url('../Fonts/segoecbd-webfont.ttf') format('truetype'),
         url('../Fonts/segoecbd-webfont.svg#SegoeCondensedBold') format('svg');
    font-weight: normal;
    font-style: normal;
}

#nav
{
    width: 96px;
    height: 239px;
    text-align: center;
    margin-right: 19px;
    float: left;
    background: url(../Assets/nav-bg.png) no-repeat;
    font-size: 16px;
    font-family: SegoeCondensedBold, Arial;
}


不确定是否相关,但这是html头信息。

<link href="Content/Css/Master.css" rel="stylesheet" type="text/css" media="screen" />
<!--[if IE 6]><link href="Content/Css/IE.css" rel="stylesheet" type="text/css" media="screen" /><![endif]-->
<!--[If IE 7]><link href="Content/Css/IE7.css" rel="stylesheet" type="text/css" media="screen" /><![endif]-->
<!--[if IE 6]>
    <style type="text/css">
        img, div, input, span, a { behavior: url("iepngfix.htc") }
    </style>
<![endif]-->
<!--[if IE 6]><script type="text/javascript" src="Script/iepngfix_tilebg.js"></script><![endif]-->


注意:这只是IE6中的问题。它可以在所有其他浏览器中使用。字体css在主css文件中。

最佳答案

输入带引号的字体名称:
font-family: 'SegoeCondensedBold', Arial;

关于css - @ font-face停止工作IE6,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/6845523/

10-12 12:58
查看更多