Is it possible to use the nth-child with modulo? I know you can specify a formula, such as
nth-child(4n+2)
But I can\'t seem t
I know this topic is very old, but here's the answer:
.parent :nth-child(4n):nth-last-child(2) ~ *,
.parent :nth-child(4n):nth-last-child(3) ~ *,
.parent :nth-child(4n):nth-last-child(4) ~ * {
color: gold;
}
This selector targets all children who are after the last child in the last full set of grouped children denoted by your nth-child formula.