Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

nth child

/* Selects the second <li> element in a list */
li:nth-child(2) {
  color: lime;
}

/* Selects every fourth element
   among any group of siblings */
:nth-child(4n) {
  color: lime;
}
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #nth #child
ADD COMMENT
Topic
Name
4+1 =