浏览器兼容之使用IE7内核浏览

标签中的X-UA-Compatible,是针对IE8的一个设置,只有IE8可以识别。

由于IE8还在测试阶段,浏览制作好的页面时经常出现错位,添加了此设置就可以让IE8浏览器使用IE7标准模式渲染网页。

不过这种做法仅限于强制IE8浏览器按IE7模式显示网站,失去了调试IE8浏览器的意义。

除此之外,X-UA-Compatibl声明还有一些其它内容,比如:

1.<meta http-equiv="X-UA-Compatible" content="IE=5" />

Windows Internet Explorer 5 显示内容的方式很相似。

2.<meta http-equiv="X-UA-Compatible" content="IE=7" />

使用了Windows Internet Explorer 7 的标准模式。

3.<meta http-equiv="X-UA-Compatible" content="IE=8" />

4.<meta http-equiv="X-UA-Compatible" content="edge" />

Edge模式通知Windows Internet Explorer 以最高级别的可用模式显示内容,这实际上破坏了“锁定”模式。

5.<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />   【在页面的HEAD之间加入此 META标记元素】

EmulateIE7模式通知 Windows Internet Explorer 使用 <!DOCTYPE> 指令确定如何呈现内容。标准模式指令以Windows Internet Explorer 7 标准模式显示,而 Quirks 模式指令以 IE5 模式显示。与 IE7 模式不,EmulateIE7 模式遵循 <!DOCTYPE> 指令。对于多数网站来说,它是首选的兼容性模式。

posted @ 2012-12-20 11:18  翱翔软件  阅读(854)  评论(0)    收藏  举报

欢迎访问翱翔软件