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

Popular posts from this blog

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -