Stackoverflow questions

by Shoaib Chikate

HTML

<ul>
    <li>First</li>
    <li>Second</li>
    <li>Third</li>
    <li>Fourth</li>
    <li>Fifth</li>
    <li>Sixth</li>
    <li>Seventh</li>
    <li>Eighth</li>
    <li>Nineth</li>
</ul>

CSS

ul > li:nth-child(3n+1){
   /*whatever your property may be*/
  background-color:orange;    
}

ul > li:nth-child(3n+2){

   background-color:white;    
}

ul >li:nth-child(3n){    
   background-color:green;
}