Hacker News new | ask | show | jobs
by anilakar 1043 days ago
You can make nth-child repeat by using an arithmetic expression inside the parentheses, like nth-child(3n). They also stack, so you can create pseudorandom transformations to a sequence of elements by adding styles for the first few prime numbers.
1 comments

Or nth-child(even), or nth-child(odd). (Keeping in mind that children are 1-indexed in CSS.)