i have the following DOM elements:
<div class="document>
<div class="text"> some text1 </div>
<div class="text"> some text2 </div>
<div class="text"> some text3 </div>
<div class="text"> some text4 </div>
</div>
i want to color them alternately, meaning text1, text3 are same color and text2, text4 are of same color.
how can this be done using css?
With css alone you can use
But it’s CSS3 only