0

我正在开发一个网站,我发现来的内容在 IE 上显示不正确,所以我想用其他与 IE 兼容的内容替换它们。

这就是我正在使用的:

<!--[if !IE]> -->
    <div id="container">
        This is not IE, you are seeing the normal content
    </div>
<!-- <![endif]-->

<!--[if IE]>
    <div id="container">
        This is IE, you are seeing IE-compatible content
    </div>
<![endif]-->

问题是 IE 版本 < 10,甚至是兼容模式为 ON 的版本 10 我看到了

This is IE, you are seeing IE-compatible content

但是在兼容模式关闭的 IE 10 中,我看到了

This is not IE, you are seeing the normal content

为什么?

对于那些想尝试的人:JSFiddle

4

2 回答 2

0

IE10不再有条件注释

于 2013-04-22T10:20:06.757 回答
0

Internet Explorer 10删除了对条件注释的支持,因此它们现在被视为常规注释。

于 2013-04-22T10:26:49.870 回答