html - 为什么这些条件注释告诉我 IE8 是 IE7?

标签 html internet-explorer conditional-comments

为什么在 Internet Explorer 8 上使用这个 HTML 页面:

<p>
<!--[if IE]> According to the conditional comment this is Internet Explorer<br /><!    [endif]-->
<!--[if IE 5]> According to the conditional comment this is Internet Explorer 5<br /> <![endif]-->
<!--[if IE 5.0]> According to the conditional comment this is Internet Explorer 5.0<br /> <![endif]-->
<!--[if IE 5.5]> According to the conditional comment this is Internet Explorer 5.5<br /> <![endif]-->
<!--[if IE 6]> According to the conditional comment this is Internet Explorer 6<br /> <![endif]-->
<!--[if IE 7]> According to the conditional comment this is Internet Explorer 7<br /> <![endif]-->
<!--[if gte IE 5]> According to the conditional comment this is Internet Explorer 5 and up<br /><![endif]-->
<!--[if lt IE 6]> According to the conditional comment this is Internet Explorer lower than 6<br /> <![endif]-->
<!--[if lte IE 5.5]> According to the conditional comment this is Internet Explorer lower or equal to 5.5<br /> <![endif]--> 
<!--[if gt IE 6]> According to the conditional comment this is Internet Explorer greater than 6<br /> <![endif]--> 
</p>

我得到这个结果?

According to the conditional comment this is Internet Explorer
According to the conditional comment this is Internet Explorer 7
According to the conditional comment this is Internet Explorer 5 and up
According to the conditional comment this is Internet Explorer greater than 6

我不应该安装 IE8 吗?

谢谢。

最佳答案

唯一出现错误的评论

According to the conditional comment this is Internet Explorer 7

浏览器是否处于兼容模式,因为这将呈现为 IE7

关于html - 为什么这些条件注释告诉我 IE8 是 IE7?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5417093/

相关文章:

ASP.NET 无表 css 表单

html - 在 IE7 中扩展出现在画廊下方的菜单

css - 我们可以这样使用 <body class ="all"&lt;!--[if IE 7]>class ="ie"&lt;![endif]-->>

php - 使用PHP将带有样式(css)的html转换为pdf

javascript - 离开初始菜单按钮时菜单缩回

html - 使用max-height =>设置的div高度,使包含的div使用CSS达到全高

javascript - Internet Explorer 11 中的 FormData.entries()?

css 框架布局在 IE 6 及更高版本中无法正常工作

internet-explorer - IE 条件注释有效但标签可见?

php 包含条件注释