Home  >  Article  >  Web Front-end  >  CSS hack usage tips for css ie6 ie7 ff_Experience exchange

CSS hack usage tips for css ie6 ie7 ff_Experience exchange

WBOY
WBOYOriginal
2016-05-16 12:04:421318browse

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.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn