li:nth-child(<index>)
li:nth-child(even) = start at 0, add 2 each time (0, 2, 4, 6)
li:nth-child(odd) = start at 1, add 2 each time (1, 3, 5, 7)
li:nth-child(3n) = start at 0, add 3 each time (0, 3, 6)
li:nth-child(3n + 1) = start at 1, add 3 each time (1, 4, 7)
li:nth-child(3n - 1) = start at -1, add 3 each time (-1, 2, 5, 8)
li:nth-child(-3n + 4) = start at 4, minus 3 each time
li:nth-last-child(<index>)
li:nth-last-child(even) = start at 8, minus 2 each time (8, 6, 4,
2, 0)
li:nth-last-child(odd) = start at 7, minus 2 each time (7, 5, 3, 1,
-1)
li:nth-last-child(3n) = start at 8, minus 3 each time (8, 5, 2, -1)
li:nth-last-child(3n + 1) = start at 7, minus 3 each time (7, 4, 1,
-2)
li:nth-last-child(3n - 1) = start at 9, minus 3 each time (9, 6, 3,
0)
li:nth-last-child(-3n + 4) = start at 4, minus-minus 3 (+3) each
time (4, 7)
:nth-child(<index> of p)
One
Two
Three
Four
Five
Six
Seven
p:nth-child(<index>)
One
Two
Three
Four
Five
Six
Seven
:nth-child(<index> of p)
One
Two
Three
Four
Five
Six
Seven
:nth-child(even of p.highlight)
One
Two
Three
Four
Five
Six
Seven