元素默认背景色为“橘黄色” #ff6700

:nth-child(8)

:nth-child(n+6)

:nth-child(-n+9)

:nth-child(n+4):nth-child(-n+8)

:nth-child(n+2):nth-child(odd):nth-child(-n+9)

:nth-child(3n+1):nth-child(even)

:nth-of-type(3)

1
2
3
4
5
6
7
8
9
10
11

span:nth-of-type(n+3) div:nth-of-type(2n+2)

1
2
3
4
5
6
7
8
9
10
11

span:nth-of-type(-n+4) div:nth-of-type(-n+5)

1
2
3
4
5
6
7
8
9
10
11

span:nth-of-type(n+3):nth-of-type(-n+6) div:nth-of-type(n+1):nth-of-type(-n+3)

1
2
3
4
5
6
7
8
9
10
11

span:nth-of-type(n+3):nth-of-type(odd):nth-of-type(-n+6) div:nth-of-type(n+1):nth-of-type(even):nth-of-type(-n+3)

1
2
3
4
5
6
7
8
9
10
11