Mastering CSS Hacks is a basic skill of front-end development engineers. With the advent of browser versions, we are looking for CSS writing that best matches the performance of various browsers. Of course, CSS Hacks is the most popular solution. However, for IE, three major versions of IE6, IE7, and IE8 will be available soon. Here, IE is a cup.
Of course, there are many people hysterical slander IE6. What mango wants to say here is that all the statements that slander IE6 are paper tigers. Looking at the history of IE6, it is by no means an error. IE7/IE8 versions with serious sequelae are the culprit of all cups. The following is the CSS Hacks statement for each IE version:
IE6:
_ Selector {property: value ;}
Selector {property: value; property: value! Important;} // IE6 does not support the same selector! ImportantIE7:
+ Selector {property: value;} IE8:
Selector {property: value \ 0;} IE6 & IE7:
* Selector {property: value;} IE6 & IE7 & IE8:
Selector {property: value \ 9;} sadly, IE8 renders the page in IE7 mode. Currently, the compatibility of multiple IE versions is usually enabled by setting the X-UA-Compatible HTTP header, which can reduce the workload of debugging IE to a certain extent. The Code is as follows:
<Meta http-equiv = "X-UA-Compatible" content = "IE = 7"> // standard IE7 Mode
<Meta http-equiv = "X-UA-Compatible" content = "IE = EmulateIE7"> // you may encounter another situation that is Compatible with IE7:
<Meta http-equiv = "X-UA-Compatible" content = "IE = Edge"> // in standard IE mode, IE8 still exists if IE = Edge is not stated compatibility mode rendering, this setting Scheme (IE = Edge) is currently being applied by koubei.
For more information about IE = Edge: http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2008-January/013635.html