<Meta http-equiv = "X-UA-compatible" content = "Ie = emulateie7"/>
X-UA-compatible is a newly added setting for IE8, which is not recognized by browsers under IE8. The difference between X-UA-compatible and content = "Ie = 7" regardless of whether the page contains <! Doctype> commands all use the standard mode of Windows Internet Explorer 7. The content = "Ie = emulateie7" Mode follows <! Doctype> command. For most websites, it is the preferred compatibility mode.
The following code must be added to the meta tag of the header of the page: adding other places will lose the style layout.
01. <meta http-equiv = "X-UA-compatible" content = "Ie = 7"/>
<Meta http-equiv = "X-UA-compatible" content = "Ie = 7"/>
For browsers other than IE8, this difference is different from content = "Ie = 7" whether or not the page contains <! Doctype> commands all use the standard mode of Windows Internet Explorer 7.
In this way, we can make the page behave normally in IE8!
The content = "Ie = emulateie7" Mode follows <! Doctype> command. For most websites, it is the preferred compatibility mode.
HTML code
01. <meta http-equiv = "X-UA-compatible" content = "Ie = 5"/>
<Meta http-equiv = "X-UA-compatible" content = "Ie = 5"/>
For example, the quirks mode of Windows Internet Explorer 7 is used, which is similar to that of Windows Internet Explorer 5.
HTML code
01. <meta http-equiv = "X-UA-compatible" content = "Ie = 7"/>
<Meta http-equiv = "X-UA-compatible" content = "Ie = 7"/>
Whether or not the page contains <! The doctype> command uses the standard rendering mode of Windows Internet Explorer 7.
HTML code
01. <meta http-equiv = "X-UA-compatible" content = "Ie = 8"/>
<Meta http-equiv = "X-UA-compatible" content = "Ie = 8"/>
The standard rendering mode of IE8 is enabled, but since the X-UA-compatible file header only supports IE8 or later versions, it is equivalent to redundant code.
HTML code
01. <meta http-equiv = "X-UA-compatible" content = "edge"/>
<Meta http-equiv = "X-UA-compatible" content = "edge"/>
Edge mode notifies Windows Internet Explorer to display content in the highest available mode, which breaks the "Lock" mode.
HTML code
01. <meta http-equiv = "X-UA-compatible" content = "Ie = emulateie7"/>
<Meta http-equiv = "X-UA-compatible" content = "Ie = emulateie7"/>
Emulateie7 mode notifies Windows Internet Explorer <! Doctype> command to determine how to present the content. Standard mode commands are displayed in Windows Internet Explorer 7 standard mode, while quirks mode commands are displayed in ie5 mode. Unlike IE7, emulateie7 follows the <! Doctype> command. For most websites, it is the preferred compatibility mode.