CSS 3 Selector not in CSS 2.1

Here's CSS 3 selector syntax that's not in CSS 2.1.

PatternMeaning
‹tag›[‹attr›^="‹val›"]Matches any ‹tag› element whose ‹attr› attribute value begins with the string "‹val›"
‹tag›[‹attr›$="‹val›"]Matches any ‹tag› element whose ‹attr› attribute value ends with the string "‹val›"
‹tag›[‹attr›*="‹val›"]Matches any ‹tag› element whose ‹attr› attribute value contains the string "‹val›"
PatternMeaning
‹tag›:rootMatches element ‹tag› that is root of document.
‹tag›:nth-child(‹n›)Matches element ‹tag› that is nth child of its parent.
‹tag›:nth-last-child(‹n›)Matches element ‹tag› that is nth child of its parent, counting from the last one.
‹tag›:nth-of-type(‹n›)Matches element ‹tag› that is nth child of the same type.
‹tag›:nth-last-of-type(‹n›)Same as ‹tag›:nth-of-type(‹n›) but counting from bottom.
‹tag›:last-childMatches element ‹tag› when ‹tag› is the last child of its parent.
‹tag›:first-of-typeSame as ‹tag›:nth-of-type(1)
‹tag›:last-of-typeSame as ‹tag›:first-of-type but the last.
‹tag›:only-childMatches element ‹tag› if it's the only child of its parent.
‹tag›:only-of-typeMatches element ‹tag› if its type is unique among siblings.
‹tag›:emptyMatches element ‹tag› that has no children (including text nodes)
‹tag›:targetMatches element ‹tag› that is the target of the referring URI.
‹tag›:enabled
‹tag›:disabled
a user interface element ‹tag› that is enabled or disabled
‹tag›:checked
‹tag›:disabled
a user interface element ‹tag› which is checked (for instance a radio-button or checkbox)
‹tag›:not(‹s›)Matches element ‹tag› if it's that does not match simple selector ‹s›.

http://www.w3.org/TR/selectors/

For complete list of CSS2.1 selectors, see http://xahlee.org/js/css_selector_syntax.html

Popular posts from this blog

Browser User Agent Strings 2012

11 Years of Writing About Emacs

does md5 creates more randomness?