Home  >  Article  >  Web Front-end  >  Multiple browser compatibility issues are all caused by IE_Experience exchange

Multiple browser compatibility issues are all caused by IE_Experience exchange

WBOY
WBOYOriginal
2016-05-16 12:08:011021browse

It has been a while since IE7 was released, so the website has one more browser to take care of. In the past two days, designers have been working on compatibility and found a solution. This is both sharing and recording. Based on my previous experience of using important! and /**/ to distinguish IE5, IE6, and Moz, the following code distinguishes 4 browsers. Copy the code and save it into an HTML file to see the effect: (


[Ctrl A Select all Note:If you need to introduce external Js, you need to refresh to execute]

Special reminder:
#example {
background: red; /*For Moz*/
}
* html #example {
background: yellow; /*For IE5*/
background/**/: green; /*For IE6*/
}
* html #example {
background: blue; /*For IE7*/
}


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