确定为什么在兼容模式下呈现页面? [英] determining why a page is being renderred in compatibility mode?
问题描述
我有一个布局问题,这是由于包含页面在IE8上以兼容模式呈现.是否有办法检测导致IE8进入特定页面兼容模式的原因?
I have a layout issue which is due to the containing page being rendered in compatibility mode on IE8. Is there a way to detect whats causing IE8 to enter compatibility mode for a particular page?
根据Microsoft的文档,下列情况可能导致页面以兼容模式呈现(
According to Microsoft's documents, the following conditions can cause a page to be rendered in compatibility mode (http://msdn.microsoft.com/en-us/library/cc288325%28VS.85%29.aspx):
- 该页面已启用兼容性视图.
- 该页面已加载到Intranet区域中,并且Internet Explorer 8已配置为在兼容性视图"中的Intranet区域中的页面.
- Internet Explorer 8配置为在兼容性视图中显示所有网站.
- Internet Explorer 8配置为使用兼容性视图列表",该列表指定始终在兼容性视图中显示的一组网站.
- 开发人员工具用于覆盖网页中指定的设置.
- 该网页遇到页面布局错误,并且Internet Explorer 8配置为通过在兼容性视图中重新打开该页面来自动从此类错误中恢复.
查看页面后,我排除了第一种可能性,即它一定是页面上的页面布局错误.我想找到此错误.
After reviewing the page, I've ruled out the first possibilities such that it must be a page layout error on the page. I'd like to locate this error.
推荐答案
检查是否有< meta>强制IE进入兼容模式的标签.
Check if you have any <meta> tags forcing IE into compatibility mode.
如果愿意,可以强制将其呈现为IE8(完全符合CSS 2.1):
You can force it to render as IE8 (fully CSS 2.1 compliant) if you wish:
<meta http-equiv="X-UA-Compatible" content="IE=8"/>
这篇关于确定为什么在兼容模式下呈现页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!