Browser compatibility of some type of css selectors
I would like to know if where is any browsers that does not support this kind of select?
1) .class-1.class-2
2) #id-1.class-2
3) .class-1 > .class-2
4) .class-1 + .class-2
5) .class[foo="bar"]
I do not have so many different OS with different browsers...So don't know where can find these compatibility. So please g开发者_开发百科ive me a hand!
IE7 and newer, as well as all other browsers, support all your given selectors.
IE6 reads
.class-1.class-2
as.class-2
(see here for a comparison)IE6 parses
#id-1.class-2
correctlyIE6 cannot read
>
, ignores entire rule completelyIE6 cannot read
+
, ignores entire rule completelyIE6 cannot read
[foo="bar"]
, ignores entire rule completely
internet explorer 5 & 6 don't support >
,+
and [attr]
selector. More information at http://www.quirksmode.org/css/contents.html
There is an extremely good site called Quirksmode.org which has a full set of compatibility charts for all CSS selectors and features.
http://www.quirksmode.org/css/contents.html
For what its worth, you'll have problems with almost all of those with IE6, but most other browsers will cope with them all just fine.
The solution: Don't support IE6.
精彩评论