Child Pseudo Class

suggest change
“The :nth-child(an+b) CSS pseudo-class matches an element that has an+b-1 siblings before it in the document tree, for a given positive or zero value for n” - MDN :nth-child

|pseudo-selector |1|2|3|4|5|6|7|8|9|10| |––––––––––|—|—|—|—|—|—|—|—|—|—| |:first-child |✔| | | | | | | | | | |:nth-child(3) | | |✔| | | | | | | | |:nth-child(n+3) | | |✔|✔|✔|✔|✔|✔|✔|✔| |:nth-child(3n) | | |✔| | |✔| | |✔| | |:nth-child(3n+1) |✔| | |✔| | |✔| | |✔| |:nth-child(-n+3) |✔|✔|✔| | | | | | | | |:nth-child(odd) |✔| |✔| |✔| |✔| |✔| | |:nth-child(even) | |✔| |✔| |✔| |✔| |✔| |:last-child | | | | | | | | | |✔| |:nth-last-child(3)| | | | | | | |✔| | |

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents