Login
From:
CSS Tip: Learn CSS the easy way
(Uncensored)
subscribe
Dynamic nth-child() using sibling-index() and if()
https://css-tip.com/nth-child/
links
backlinks
Roast topics
Find topics
Find it!
We can get the index of an element using sibling-index(), and we can express inline conditions using if(). With both features, we can implement :nth-child(An + B).