h1和h2类不显示在Internet Explorer中 [英] h1 and h2 classes not showing up in Internet Explorer

查看:189
本文介绍了h1和h2类不显示在Internet Explorer中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法在Internet Explorer中显示 h1 h2 标记。我看了CSS文件,但仍然不能明白为什么它不能与IE9工作。

I'm having trouble getting the h1 and h2 tags to display at all in Internet Explorer. I looked at the CSS file but still couldn't see why it wouldn't work with IE9.

这里是没有显示的头文件的CSS代码IE:

Here is the CSS code for the headers that are not showing up in IE:

.person h1
{ 
  color: #475261; 
  font-size: 48px;
  font-weight: 400; 
  letter-spacing: -1px;
  margin-left: -60px; 
}

.item h2
{ 
  color: #06A; 
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 400; 
  letter-spacing: -1px; 
}

.item h2 a
{
  color: #06A;
  text-decoration: none;
}

链接: http://ItsNotch.com/experience

推荐答案

问题原因< h2>

看起来h1元素被cufon-yui.js脚本替换为canvas元素。根据此常见问题,它已知无法在IE 9测试版工作。

Cause of Problem

It appears that the h1 elements are being replaced by canvas elements by the cufon-yui.js script. According to this FAQ, it is known to not work in IE 9 Beta.

但是,他们说他们的版本1.09i有一个修复, a href =http://cufon.shoqolate.com/generate/ =nofollow>其官方网站。

However, they state there is a fix for it in their version 1.09i available at their official site.

如果你看FAQ的第8项,他们说如果你不要更新您的js文件,您可以尝试一些其他代码:

If you look at item 8 of the FAQ, they say that if you don't want to update your js file, you can try some other code:

<!--[if gte IE 9]>
    <script type="text/javascript">
        Cufon.set('engine', 'canvas');
    </script>
<![endif]-->

阅读常见问题以获取更多说明。

Read the FAQ for further instructions. I'm not sure if it will work though, just a warning.

您也可以有意尝试 Typekit ,而根据 cufon主站点,还具有文本可选择的优点,它目前不使用cufon:

You may also be interested in trying Typekit instead, which according to the cufon main site, also has the advantage of the text being selectable, which it currently isn't using cufon:


您可能还希望将此
机会改为尝试Typekit ,一个托管的,
@基于字体的替代方法。是的,
意味着他们支持文本
选择。这是
拥抱标准的最简单方法。

You might also want to take this opportunity to try Typekit, a hosted, @font-face-based alternative. Yes, that means they support text selection. It's the easiest way to embrace standards.



第四个解决方案



你也可以选择不使用这些JavaScript注入的特殊字体。

Fourth Solution

You also always have the option of just not using one of these JavaScript-injected special fonts at all.

这篇关于h1和h2类不显示在Internet Explorer中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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