SyntaxFix
Write A Post
Hire A Developer
Questions
Perhaps using the "~" selector of CSS?
.myclass { background: red; } .myclass~.myclass { background: yellow; } .myclass~.myclass~.myclass { background: green; }
See my example on jsfiddle