cheat sheets.

$ cheat css_selectors
css_selectors:
  CSS 1
  E		  An element of type E
  S1 S2		  Any selector S1 with descendant match S2 (not just children)
  E F		  ... such as element E with descendant element F
  E.myclass	  Element E marked with class "myclass"
  E#myid	  ... with a document ID of "myid"
  E:link	  ... which is an unvisited link
  E:visited	  ... which is a visited link
  E:active	  ... which is activated (such as between mouse down and up)
  E:hover	  ... with a pointing device within its boundaries
  E:focus	  ... which has input device focus
  E::first-line	  The first formatted line of E element
  E::first-letter The first formatted letter of E element
  S1, S2	  Matching S1 or S2

  CSS 2
  *	          Special name matching any element
  S1 > S2	  Selector S1 with child matching S2
  S1 + S2	  Selector S1 with immediately following sibling matching S2
  E[attr]	  An E element with a "attr" attribute
  E[attr="val"]   ... whose value is exactly equal to "val"
  E[attr~="val"]  ... with "val" as a whitespace-separated element
  E[attr|="en"]   ... whose value is "en" or begins with "en-" (hreflang)
  E:first-child   E element, first child of its parent
  E:lang(fr)      E element in language "fr" (lang or xml:lang)
  E::before       Generated content before E element (see style 'content')
  E::after        Generated content after E element (see style 'content')
Version 3, updated 156 days ago.
. o 0 ( | previous | history | revert to | current | diff )
( add new | see all )