为什么我的@ font-face只在ie9中断? [英] Why is my @font-face broken in ie9 only?

查看:167
本文介绍了为什么我的@ font-face只在ie9中断?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一个网站构建的ie测试阶段,我不能得到字体工作在ie9。奇怪的部分是,他们工作很好在ie7& ie8和兼容模式。也许甚至陌生人的事实,演示文件工作正常。我知道这可能是我的管道弄乱了,但我找不到这个问题在任何地方。



我想知道是否有东西破坏所有的字体

:更新了下面的代码。

仍然遇到此问题。



以下是一些相关字体的相关信息和示例代码。共有5种字体,它们都是以这种方式设置的,并且遇到相同的问题。



测试网站: http://dev.citylightphilly.com



文件结构: all字体& stylesheet.css in / wp-content / themes / my_theme / fonts /



HTML(在header.php中)

 <! -  @ Font-Face Webfonts  - > 
< link rel =stylesheethref =<?php bloginfo('stylesheet_directory');?> /fonts/stylesheet.css/>
<! - CSS:implied media =all - >
<?php versioned_stylesheet($ GLOBALS [TEMPLATE_RELATIVE_URL]。style.css?v = 2)?

CSS(/fonts/stylesheet.css)

  @ font-face {
font-family:'NovecentowideBold';
src:url('Novecentowide-Bold-webfont.eot');
src:url('Novecentowide-Bold-webfont.eot?#iefix')format('embedded-opentype'),
url('Novecentowide-Bold-webfont.woff')format '),
url('Novecentowide-Bold-webfont.ttf')format('truetype'),
url('Novecentowide-Bold-webfont.svg#NovecentowideBold')format('svg') ;
font-weight:normal;
font-style:normal;

CSS(style.css)

  h3,h4,h5,h6,nav {
font-family:'NovecentowideBold','Myriad Headline',Tahoma,Calibri,sans-serif;
}


解决方案

中找到的CSS中的代码



http://dev.citylightphilly.com/wp-content/themes/citylight2/style.css



尝试移除此部分:

  body,p,li {
font-family:
line-height:150%;
}

其他一切对我都很好。


I'm in the ie testing phase of a site build and I cannot get the fonts to work in ie9. The strange part is that they work just fine in ie7 & ie8 AND in compatibility mode. Perhaps even stranger is the fact that the demo files work just fine. I realize this suggests I might have the plumbing messed up, but I can't find the issue anywhere.

I'm wondering if something is breaking all of the fonts in ie9 for this site -- they all look like 'times new roman' to me.

EDIT: updated the code below. Still experiencing the issue.

Below is some relevant info and sample code for one of the fonts in question. There are 5 fonts in total, and they are all set up this exact way and experiencing the same problem.

Testing Site: http://dev.citylightphilly.com

File structure: all fonts & stylesheet.css in /wp-content/themes/my_theme/fonts/

HTML (in header.php)

<!-- @Font-Face Webfonts --> 
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?  >/fonts/stylesheet.css" />
<!-- CSS : implied media="all" -->
    <?php versioned_stylesheet($GLOBALS["TEMPLATE_RELATIVE_URL"]."style.css?v=2") ?>

CSS (/fonts/stylesheet.css)

@font-face {
font-family: 'NovecentowideBold';
src: url('Novecentowide-Bold-webfont.eot');
src: url('Novecentowide-Bold-webfont.eot?#iefix') format('embedded-opentype'),
     url('Novecentowide-Bold-webfont.woff') format('woff'),
     url('Novecentowide-Bold-webfont.ttf') format('truetype'),
     url('Novecentowide-Bold-webfont.svg#NovecentowideBold') format('svg');
font-weight: normal;
font-style: normal;

CSS (style.css)

h3, h4, h5, h6, nav {
  font-family: 'NovecentowideBold', 'Myriad Headline', Tahoma, Calibri, sans-serif;
}

解决方案

I think it might be the code in the CSS found in

http://dev.citylightphilly.com/wp-content/themes/citylight2/style.css

Try removing this section:

body, p, li { 
  font-family: ;
  line-height: 150%;
}

Everything else looks good to me.

这篇关于为什么我的@ font-face只在ie9中断?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆