IE8和IE9的兼容性问题

时间:2014-01-22 14:26:05

标签: internet-explorer ie-compatibility-mode

目前,我的Web应用程序正在使用IE7兼容模式,即我使用以下元标记。

meta http-equiv="X-UA-Compatible" content="IE=7"

但是现在我想不支持IE7并使用IE8,IE9兼容模式。

meta http-equiv="X-UA-Compatible" content="IE=8,IE=9" 

然而,这样做会破坏我的UI,并且我也开始出现以下错误。

  

类型错误对象不支持此属性或方法__defineGetter__

另外,我在IE支持中找到了以下链接。

https://connect.microsoft.com/IE/feedback/details/757992/implement-object-prototype-definegetter-and-object-prototype-definesetter-for-compatibility

有没有其他方法可以支持IE8和IE9?

1 个答案:

答案 0 :(得分:-1)

尝试将以下css类添加到您的页面。我遇到了同样的问题,并在添加此内容后得到修复。

 /* For modern browsers */.clearfix:before, .clearfix:after
        {
            content: "";
            display: table;
        }
        .clearfix:after
        {
            clear: both;
        }
        /* For IE 6/7 (trigger hasLayout) */.clearfix
        {
            zoom: 1;
        }
相关问题