Select even elements of a particular class in CSS - HTML CSS CSS Selector

HTML CSS examples for CSS Selector:class

Description

Select even elements of a particular class in CSS

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
li {<!--from  w  w w .  ja v  a  2  s .  c o  m-->
   list-style:none;
}

.a {
   color:Chartreuse;
}

.b {
   color:yellow;
}

.c {
   color:blue;
}
</style> 
 </head> 
 <body> 
  <ul> 
   <li class="c">Lore</li> 
   <li class="b">Lore</li> 
   <li class="a">Lore</li> 
   <li class="c">Lore</li> 
   <li class="b">Lore</li> 
   <li class="a">Lore</li> 
  </ul>  
 </body>
</html>

Related Tutorials