html - Use CSS selector to change div class at pair of 2 elements -
i tried using css select collection of divs in pairs of 2 @ 2.
example:
i have aa aa aa aa aa aa using selector need change css of 2 elements in step of 2 (a , b letter div):
aa bb aa bb aa bb
i'm trying
&:nth-child(3n+3)
but without success. help?
if understood correct, need 2 rules that
div { display: inline-block; } div:nth-child(4n+3), div:nth-child(4n+4) { color: red; }
<div>a</div><div>a</div> <div>a</div><div>a</div> <div>a</div><div>a</div> <div>a</div><div>a</div> <div>a</div><div>a</div> <div>a</div><div>a</div>
Comments
Post a Comment