Rollover list with the first child already activated - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:UL Element

Description

Rollover list with the first child already activated

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:first-child {<!--from   ww w .j a v a2 s.  co m-->
   color:Chartreuse;
}

li:hover {
   color:yellow;
}

ul:hover li:first-child {
   color:blue;
}

ul:hover li:first-child:hover {
   color:pink;
}
</style> 
 </head> 
 <body> 
  <ul> 
   <li>Lore</li> 
   <li>Lore</li> 
   <li>Lore</li> 
  </ul>  
 </body>
</html>

Related Tutorials