Basic selectors
Wildcard selector: selects all elements* {}div {}[src] {}#menu {} /* or [id="menu"] {} */.centered {} /* or [class~="centered"] {} */Selector grouping
selector grouping (,): enables to specify common values in one place
div, #menu, .centered {}Selector chaining
Selector chainingdiv.#menu.centered[name="Menu"]:first-child::first-letter {}Attribute value selectors
[attribute="value"] selector: selects all elements with the specified attribute and value[target="_blank"] {}[title~="flower"] {}[class|="top"] {}[class^="top"] {}[class$="test"] {}[class*="te"] {}Selector combination
Descendant selector (space): matches all elements that are descendants of a specified elementdiv p {}div > p {}div + p {}div ~ p {} 
No comments:
Post a Comment