我正在开发一个网站,我发现来的内容在 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