IE compatibility mode to solve the problem (using fixed the IE rendering mode)

Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/z858466/article/details/81161199

IE browsers from IE8 to start adding a compatibility mode, will render at lower versions of IE after opening. Compatibility mode may cause the page display problems, so we usually add the following code in HTML to use the IE rendering mode fixed:

The code is set to html5 mode, then after the user opens the project, the document mode is the standard; that is, will not be ie5Qurik model; but there may be ie7 standard mode;

<meta http-equiv="X-UA-Compatible"content="IE=8"><!--以IE8模式渲染--> 
<meta http-equiv="X-UA-Compatible"content="IE=7"><!--以IE7模式渲染--> 

In another case, only in IE8 compatibility mode does not use the page to display properly, but if you set IE8 mode, but it will lead to in the IE9 CSS3 failure. It seems, need for IE8, IE9 compatibility mode are disabled. How to do it? May determine the background browser version, if IE8 outputs content = "IE = 8", if IE9 outputs content = "IE = 9". In fact, it can also be achieved simply by HTML, HTML code is as follows:

<meta http-equiv="X-UA-Compatible"content="IE=9; IE=8; IE=7; IE=EDGE"> 

In html head in to write this code, you can browse the document mode highest level mode for you;

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

Supplementary three :
1. If your code in jsp environment, in the form of iframe display, the above code written in common.jsp or your basic.jsp can;
2. After I proved this sentence:

<meta http-equiv=X-UA-Compatible content=”IE=10“>

Invalid, must be written = EmulateIE10 IEs;
3. write mode a plurality of documents, so you can

<meta http-equiv=”X-UA-Compatible” content=”EmulateIE8, EmulateIE10″>

Guess you like

Origin blog.csdn.net/z858466/article/details/81161199