简体   繁体   English

Hack for IE9兼容模式

[英]Hack for IE9 compatibility mode

I have a website. 我有一个网站。 Its one section looks the way i want in IE9 and in IE8 . 它的一个部分看起来我想在IE9IE8 But when IE9 compatibility mode is selected the look changes. 但是当选择IE9 compatibility mode时,外观会发生变化。 How can i write a hack for that? 我怎么能为此写一个黑客?

Short answer: don't use compatibility mode. 简答:不要使用兼容模式。

You can force IE not to use compat mode with the following line in the <head> section of your HTML code: 您可以强制IE不要在HTML代码的<head>部分中使用以下行使用compat模式:

<meta http-equiv="X-UA-Compatible" content="IE=edge">

Hope that helps. 希望有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM