Pattern:
:nth-of-type(Nth)
The argument Nth is of the following format:
- ODD
Odd numbers, the same signification as 2n+1
- EVEN
Even, the same as 2n
- [-|+]?[0-9]+
E.g., 0, 6, +7
- [-|+]?[0-9]+N[[-|+]?[0-9]+]?
E.g., 5n, 2n+1, -2n+1
Definition:
The ELEM:nth-of-type(Nth) pseudo-class represents every element that is the Nth ELEM type child of its parent element.
Examples:
1 | img:nth-of-type( 2 n+ 1 ) { background : magenta; } |
Please login to continue.