First of all, we introduce the principle of hack, that is, different browsers to identify different characters
Common special character recognition tables in CSS:
(1) *: IE6+IE7 can recognize *, and standard browser FF+IE8 is not recognized *;
(2)!important: Except IE6 can not recognize!important, FF+IE8+IE7 can identify!important;
(3) _: In addition to IE6 support _, Ff+ie8+ie7 are not supported _;
(4) \9: All IE browsers are recognized (IE6, IE7, IE8, IE9)
Example:
(1) difference between FF (IE8) and IE6 IE7
Backgorund:orange; FF and IE8 background color will be orange
*backgorund:red; IE6 and IE7 background color will be red
(2) difference between FF (IE8) and IE6 and IE7
Background:orange; FF and IE8 background color will be orange
*background:red!important; IE7 background color will be red
*background:blue; IE6 background color will be blue
(3) difference between FF (IE8) and IE6 and IE7
Background:orange; FF and IE8 background color will be orange
*background:red; IE7 background color will be red
_background:blue; IE6 background color will be blue
(4) difference between FF and IE6 IE7 IE8 IE9
Color:gray; Non-IE browser font color will be gray in FF
color:red\9; IE8 IE9 font color will be red
*color:green; IE7 font color will be green
_color:blue; IE6 font color will be blue
Hint: CSS hack writing order: first write FF and other non-IE browser required style, followed by write IE8 required style, then IE7, then IE6!