/ * CSS attribute level hack */color:red; /* All browsers can recognize */_color:red; /* only IE6 identification */*color:red; /* IE6, IE7 identify */+color:red; /* IE6, IE7 identify */*+color:red; /* IE6, IE7 identify */[color:red; /* IE6, IE7 identify */color:red\9; /* IE6, IE7, IE8, IE9 identify */color:red\0; /* IE8, IE9 identify */color:red\9\0; /* only IE9 identification */color:red; /* only IE9 identification */color:red!important; /* IE6 do not recognize!important details see */-------------------------------------------------------------//CSS selector level hack */*html #demo {color:red;} /* Only IE6 identify */*+html #demo {color:red;} /* Only IE7 recognize */body:nth-of-type (1) #demo {color:red;}/* ie9+, ff3.5+, Chrome, Safari, Opera can identify */head:first-child+body #dem o {color:red;}/* ie7+, FF, Chrome, Safari, Opera can recognize */:root #demo {color:red\9;}:/* only IE9 recognition */------------------------ --------------------------------------/* IE conditional comment hack details see * /<!--[If ie]> here the content is only IE visible <! [EndIf] - <!--[If IE 6]> content is only IE6.0 visible here <! [EndIf] - <!--[If IE 7]> content is only IE7.0 visible here <! [EndIf] - <!--[If GTE IE 6]> IE6 and IE6 above are recognized <! [EndIf] -<!--[If Lt IE 7]> IE7 and IE7 The following versions are recognized <! [EndIf] -<!--[If GTE IE 7]> IE7 and IE7 above are recognized <! [EndIf] -<!--[if! Ie]> Here the content is only non-ie visible <! [EndIf] -
Use CSS hack technology to solve browser compatibility issues.