Comment: I accidentally saw Baidu's page code and thought of a statement writing method. Friends who need it can refer to it.
<!DOCTYPE html> is a statement of HTML5. Only IE8 and below in mainstream browsers do not support it, so IE will enter Quirks mode. However, subsequent declarations can force specify the rendering mode of IE, so the <!DOCTYPE html> declaration has no effect on IE.HTML5 is not as strict as XHTML. For general xhtml pages, they basically do not fully pass the W3C verification standard, but can basically pass it after changing to HTML5 declaration.
<!DOCTYPE html>
<!–[if IE]>
<meta http-equiv=X-UA-Compatible content=IE=8″ />
<![endif]->
<!–[if IE 7]>
<meta http-equiv=X-UA-Compatible content=IE=7″ />
<![endif]->
<!–[if IE 6]>
<meta http-equiv=X-UA-Compatible content=IE=6″ />
<![endif]->
About X-UA-Compatible
Most websites currently use
<meta http-equiv=X-UA-Compatible content=IE=EmulateIE7 >
As an IE8 compatibility method, although Microsoft has taken IE a big step towards standard, it is an indisputable fact that there are still a series of strange rendering phenomena in IE8.
Who makes IE6 so much? Perhaps after 2014 we can have more time to care about IE8 instead of IE6 or IE7.
The methods available in X-UA-Compatible are:
<meta http-equiv="X-UA-Compatible" content="IE=5" >
<meta http-equiv="X-UA-Compatible" content="IE=7" >
<meta http-equiv="X-UA-Compatible" content="IE=8" >
<meta http-equiv="X-UA-Compatible" content="IE=edge" >
[html]
The last line is always displayed in the latest IE version mode.
Plus
[code]
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" >
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" >
When using Emulate mode, we pay more attention to <!DOCTYPE>
So at present, cloud download is recommended as follows
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" >
First choice.