Highlight multiple span tags on hover - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Hover on list

Description

Highlight multiple span tags on hover

Demo Code

ResultView the demo in separate window


<html>
 <head> 
  <style>
span:hover,<!--from   www.ja va2s . c  o  m-->
span:hover~span {
   background-color:Chartreuse;
}
</style> 
 </head> 
 <body> 
  <p>Lorem ipsum<span>Lorem</span>Lorem ipsum<span>Lore</span>Lorem ipsum dol</p>  
 </body>
</html>

Related Tutorials