Select even numbered list item - HTML CSS CSS

HTML CSS examples for CSS:Selector

Description

Select even numbered list item

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:nth-child(2n):hover {
   color:Chartreuse;
}
</style> <!--from   www.ja v  a  2  s. c o  m-->
 </head> 
 <body> 
  <li>Lo</li> 
  <li>Lo</li> 
  <li>Lo</li> 
  <li>Lo</li>  
 </body>
</html>

Related Tutorials