我正在開發一個網站,我看到內容在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,甚至是10版以兼容模式打開,我看到
This is IE, you are seeing IE-compatible content
但隨着IE 10與兼容模式OFF我看
This is not IE, you are seeing the normal content
爲什麼?
對於那些誰願意嘗試:JSFiddle
已經告訴這裏: http://stackoverflow.com/questions/9900311/how-do-i-target-only-internet-explorer-10-for-certain-situations-like-internet-e – Flowen 2013-04-22 10:25:14