开发者

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.

  1. IE6 reads .class-1.class-2 as .class-2 (see here for a comparison)

  2. IE6 parses #id-1.class-2 correctly

  3. IE6 cannot read >, ignores entire rule completely

  4. IE6 cannot read +, ignores entire rule completely

  5. IE6 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜