:nth-child selectors

Exploring CSS3 pseudo-classes to select particular members of a set.

I’m trying to wrap my head around the :nth-child selectors. Gone are the days of chaining complex selectors to get individual elements. Unfortunately, the syntax is still a little tough.

Browser support is crazy good, with everything unprefixed and support for IE9+.

Use the number toggles on the top left to adjust the selected elements.

Groups Of:

Child:

  • Alabama
  • Alaska
  • Arizona
  • Arkansas
  • California
  • Colorado
  • Connecticut
  • Delaware
  • Florida
  • Georgia
  • Hawaii
  • Idaho
  • Illinois
  • Indiana
  • Iowa
  • Kansas
  • Kentucky
  • Louisiana
  • Maine
  • Maryland
  • Massachusetts
  • Michigan
  • Minnesota
  • Mississippi
  • Missouri
  • Montana
  • Nebraska
  • Nevada
  • New Hampshire
  • New Jersey
  • New Mexico
  • New York
  • North Carolina
  • North Dakota
  • Ohio
  • Oklahoma
  • Oregon
  • Pennsylvania
  • Rhode Island
  • South Carolina
  • South Dakota
  • Tennessee
  • Texas
  • Utah
  • Vermont
  • Virginia
  • Washington
  • West Virginia
  • Wisconsin
  • Wyoming
.states li:nth-child(0n+0){ background-color:#666; color:#bbb; }