First, a few tidbits:
- nth-child uses based indexes
1for matching (i.e. nth-child(1), this is the first child, not the second) nthe designation An + Bindicates the value of the iteratornstarts with 0and countsAn + Bwill be a matching index (I will call it i)
read the specification for more information
If you have a set of elements that you want to map, you should write them:
Example:
1st, 10th, 19th, 28th...
In this case, you want to map nto specific indices
n | i
======
0 | 1
1 | 10
2 | 19
3 | 28
4 | 37
etc...
An + B = i n = 0, i = 1, B:
A(0) + B = 1
B = 1
, n = 1, i = 10:
A(1) + 1 = 10;
A = 9;
, 9n + 1 , 1,10,19,28,etc
, , A, - B.
nth-child - ,