Select all elements of a given class on hover, except for current one - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Hover class

Description

Select all elements of a given class on hover, except for current one

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">
#items:hover>li {
   padding-left:6px;
}

#items:hover>li:hover {
   padding-left:0;
}
</style> <!--  w  ww  . jav a  2 s  . c o  m-->
 </head> 
 <body> 
  <ol id="items"> 
   <li>Lorem </li> 
   <li>Lorem </li> 
   <li>Lorem </li> 
   <li>Lorem </li> 
   <li>Lorem </li> 
  </ol>  
 </body>
</html>

Related Tutorials