刚刚安装了IE8 , 发现有一些网页打开以后与在IE7下显示的效果不一样了,有的变形很厉害。上微软网站仔细搜寻了一下找到了解决方法。
IE8开发小组希望可以打造出IE8的"标准模式",比IE7的好很多很多的"标准模式",而且也是无限接近W3C的WEB标准的。
总得来说,IE8默认将会以IE8的"标准模式"来处理网页,但仍将通过特殊方式对为IE7,IE6开发的网页提供兼容性支持,以让页面设计师可以平稳过渡到新版本浏览器的"标准模式"。基于微软的互动性政策,网页开发师可以在页面的header/meta标记里注明这是为哪个浏览器开发的,for IE7或者IE8,那IE8就会用IE7的"标准模式"来处理页面。
如何标记呢?请看下面:
Using a simple meta declaration, we can specify the rendering engine we would like IE8 to use. For example, inserting this:
- <meta http-equiv="X-UA-Compatible" content="IE=8" />
into the head of a document would make IE8 render the page using the new standards mode. This syntax could be easily expanded to incorporate other browsers as well:
- <meta http-equiv="X-UA-Compatible" content="IE=8;FF=3;OtherUA=4" />
...
参考文章地址:http://blogs.msdn.com/ie/archive/2008/03/03/microsoft-s-interoperability-principles-and-ie8.aspx