这些选择器是CSS 2.1还是CSS 3的一部分?

时间:2010-07-04 14:34:25

标签: css3 css-selectors w3c css

这些选择器是CSS 2.1,CSS 3还是两者兼有?

E[att^="val"]
E[att$="val"]
E[att*="val"]
E:last-child
E ~ F

这些是CSS中所有可用的选择器吗? 请告诉我哪个选择器是哪个CSS版本的一部分?

*
E
.class
#id
E F
E > F
E + F
E[attribute]
E[attribute=value]
E[attribute~=value]
E[attribute|=value]
:first-child
:lang()
:before
::before
:after
::after
:first-letter
::first-letter
:first-line
::first-line
E[attribute^=value]
E[attribute$=value]
E[attribute*=value]
E ~ F
:root
:last-child
:only-child
:nth-child()
:nth-last-child()
:first-of-type
:last-of-type
:only-of-type
:nth-of-type()
:nth-last-of-type()
:empty
:not()
:target
:enabled
:disabled
:checked

1 个答案:

答案 0 :(得分:3)

所有CSS 3。

最后一个E ~ Fgeneral sibling combinator

有关哪个浏览器支持哪个选择器的信息,请参阅quirksmode.org compatibility table