CSS3 Structural Pseudo-class Expressions Explained
You probably know that the CSS3 spec includes a number of structural pseudo-classes. Four of these pseudo-classes use function-like syntax that allow an argument to be passed in using parentheses. These are: nth-child(), nth-last-child(), nth-of-type(), and nth-last-of-type().
The purpose of the parentheses is to allow one or more elements to be selected based on a keyword (either odd
or even
), an integer, or an expression.