Home  >  Article  >  Web Front-end  >  About CSS multi-category selectors under IE6

About CSS multi-category selectors under IE6

巴扎黑
巴扎黑Original
2017-04-05 16:26:511435browse

How to write multi-category selectors. For example:

​#my.c1.c2 { color:red;}
​.c1.c2 { color:red;}

The above writing method is supported by browsers such as IE7+/FF/Opera/Safari.

But in IE6, the latter class name will overwrite the previous class name. That is to say, the above example is understood by IE6 as:

​#my.c2 { color:red;}
​.c2 { color:red;}

Same reason:

​#my.c1.c2.c3 { color:red;}
IE6 understands it as #my.c3 {color:red;}
​.c1.c2.c3 { color:red;}
IE6 understands it as .c3 { color:red; }

Therefore, when using multiple classes to combine to achieve CSS effects during development, pay attention to this problem in IE6. The best way is not to use class combinations.

The above is the detailed content of About CSS multi-category selectors under IE6. For more information, please follow other related articles on the PHP Chinese website!

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