@font-face IE6 停止工作
我刚刚测试了一个在 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 中的问题。它适用于所有其他浏览器。 font-face css 位于主 css 文件中。
I have just been testing a site which uses @font-face in IE6. At first, it worked and the fonts were replaced. Then when I tested it again, the @font-face has completely stopped working and I can't find any reason for it.
The css I'm using is
@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;
}
Not sure if it's relevant but here's the html head info.
<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]-->
Note: This is only a problem in IE6. It works in all other browsers. The font-face css is in the master css file.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在引号中输入字体名称:
字体系列:'SegoeCondensedBold',Arial;
Enter the font name in quotes:
font-family: 'SegoeCondensedBold', Arial;