Line 3 is a hidden . I don\'t want that one to be taken from the odd/even css rule. What is the best approach to get t
. I don\'t want that one to be taken from the odd/even css rule. What is the best approach to get t
odd/even css
What is the best approach to get t
Here's a CSS-only solution:
.box { background: orange; } .box:nth-child(even) { background: green; } .box.hidden { display: none; } .box.hidden ~ .box:nth-child(odd) { background: green; } .box.hidden ~ .box:nth-child(even) { background: orange; }
xx xx xx xx xx xx xx