Home > Article > Web Front-end > CSS hack usage tips for css ie6 ie7 ff_Experience exchange
FF browser
.test{
height:20px;
background-color:orange;
}
IE7 browser
* html .test{/*IE7*/
height:20px;
background-color:blue;
}
IE6 browser
*html .test{/*IE6*/
height:20px;
background-color:black;
}
From the above CSS code, we can see that FF is still the most obedient browser. In IE6 and IE7, if you want to use HACK, you must add the html tag in front.
It’s easy to remember here. IE6 adds *html, and IE7 adds *html, implying that a version has been added.
The advantage of CSS HACK done on class and id is that there is no need to take into account the order, and it is easy for management and other personnel to accept. It can also achieve similar JS browser version control through this HACK.