Drugą ważną nowością wprowadzoną w projekcie trzeciej specyfikacji CSS są nowe selektory, dzięki którym jeszcze lepiej i precyzyjniej będziemy mogli kontrolować wygląd poszczególnych elementów strony WWW.
W dalszej części niniejszego podrozdziału opisałem dokładnie nowe selektory i przedstawiłem sposoby ich wykorzystania. Natomiast w tabeli znajdziesz wykaz obsługi poszczególnych selektorów w różnych przeglądarkach.
element | IE 8 | Firefox 3.5.4 | Opera 10 | Chrome 3.0.195.25 | Safari 4.0.3 |
selektor atrybutu E[att^=”val”] | nie | tak | tak | tak | tak |
selektor atrybutu E[att$=”val”] | nie | tak | tak | tak | tak |
selektor atrybutu E[att*=”val”] | nie | tak | tak | tak | tak |
selektor ogólnego rodzeństwa | nie | tak | tak | tak | tak |
pseudoklasa :target | nie | tak | tak | tak | tak |
pseudoklasa :enabled | nie | tak | tak | tak | tak |
pseudoklasa :disabled | nie | tak | tak | tak | tak |
pseudoklasa :checked | nie | tak | tak | tak | tak |
pseudoklasa :root | nie | tak | tak | tak | tak |
pseudoklasa :nth-child(numer) | nie | tak | tak | tak | tak |
pseudoklasa :nth-child(odd) | nie | tak | tak | tak | tak |
pseudoklasa :nth-child(even) | nie | tak | tak | tak | tak |
pseudoklasa :nth-child(formuła) | nie | tak | tak | tak | tak |
pseudoklasa :nth-last-child(numer) | nie | tak | tak | tak | tak |
pseudoklasa :nth-last-child(odd) | nie | tak | tak | tak | tak |
pseudoklasa :nth-last-child(even) | nie | tak | tak | tak | tak |
pseudoklasa :nth-last-child(formuła) | nie | tak | tak | tak | tak |
pseudoklasa :nth-of-type(numer) | nie | tak | tak | tak | tak |
pseudoklasa :nth-of-type(odd) | nie | tak | tak | tak | tak |
pseudoklasa :nth-of-type(even) | nie | tak | tak | tak | tak |
pseudoklasa :nth-of-type(formuła) | nie | tak | tak | tak | tak |
pseudoklasa :nth-last-of-type(numer) | nie | tak | tak | tak | tak |
pseudoklasa :nth-last-of-type(odd) | nie | tak | tak | tak | tak |
pseudoklasa :nth-last-of-type(even) | nie | tak | tak | tak | tak |
pseudoklasa :nth-last-of-type(formuła) | nie | tak | tak | tak | tak |
pseudoklasa :last-child | nie | tak | tak | tak | tak |
pseudoklasa :first-of-type | nie | tak | tak | tak | tak |
pseudoklasa :only-child | nie | tak | tak | tak | tak |
pseudoklasa :only-of-type | nie | tak | tak | tak | tak |
pseudoklasa :empty | nie | tak | tak | tak | tak |
pseudoklasa :not | nie | tak | tak | tak | tak |
pseudoelement :selection | nie | tak | tak | tak | tak |
text-shadow | nie | tak | tak | tak | tak |
text-align (dla wartości start i end) | nie | nie | nie | tak | tak |
word-wrap | tak | tak | nie | tak | tak |
model barw hsl | nie | tak | tak | tak | tak |
model barw hsla | nie | tak | tak | tak | tak |
model barw rgba | nie | tak | tak | tak | tak |
opacity | nie | tak | tak | tak | tak |
background-size | nie | nie | nie | tak | nie |
background-clip | nie | nie | nie | tak | nie |
wieloelementowe tło | nie | nie | nie | tak | tak |
border-top-left-radius | nie | nie | nie | tak | nie |
border-top-right-radius | nie | nie | nie | tak | nie |
border-bottom-left-radius | nie | nie | nie | tak | nie |
border-bottom-right-radius | nie | nie | nie | tak | nie |
border-radius | nie | nie | nie | tak | nie |
box-sizing | nie | nie | nie | tak | tak |
resize | nie | nie | tak | nie | nie |
outline-offset | nie | tak | tak | tak | tak |
@font-face | nie | tak | tak | nie | tak |