nth-child practice!
This is a little tool for practicing nth-child and figuring out it works if you're new to it. Play around and see what cool patterns you can create!
Some tips:
-
to select every xth element --> nth-child(xn)
-
to select elements starting at x --> nth-child(n + x)
-
to select element up to x --> nth-child(-n + x)
Bonus tip!
-
you can chain the previous 2 techniques to select a range of elements starting at x and up to y --> nth-child(n + x):nth-child(-n + y)