Home  >  Article  >  Web Front-end  >  Detailed tutorial on the use of CSS conditional annotations_Experience exchange

Detailed tutorial on the use of CSS conditional annotations_Experience exchange

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

Statement: The following content was collected from the Internet and edited after being understood by Caizi. Please keep the link to Caizi’s website for reprinting. Thank you! ! !
Talented Notes: http://blog.54caizi.com

Friends who play WEB reconstruction believe that they all have the same trouble, that is, due to different browser versions, some elements in CSS The explanations are also different. Of course, Caizi has encountered the same problem and has also collected some solutions. Caizi has previously posted two codes that select different CSS for different browser versions. Friends who are interested can look for it themselves.

In fact, we can also use conditional comments to achieve similar purposes. What are conditional comments? Caizi will briefly introduce them here. They are nothing more than some if judgments, haha, but these judgments are not in the script. It is executed directly in the html code. Let’s introduce how to use it.




Here XXX is some specific Dongdong, here are a few lists, introducing their meanings in detail:











The detailed usage has been introduced That’s it, one thing I have to mention is:
Conditional comments were only supported by IE after IE5.0/Win, and are invalid for browsers before IE5. However, there should be few people still using the IE4 version. Bar. ^0^

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