Change other div on hover - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Hover to change

Description

Change other div on hover

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">
#container {<!-- w  w w .  j a v  a 2 s. com-->
   width:251px;
   height:251px;
   border:2px solid Chartreuse;
}

a {
   height:251px;
   width:251px;
}

.hover {
   height:251px;
   width:251px;
   position:absolute;
   z-index:2;
}

.hover:hover>.imgdiv {
   opacity:0.6;
   height:301px;
}

a:hover + .imgdiv_2 {
   width:4301px;
}

.imgdiv {
   height:251px;
   width:251px;
   background-color:yellow;
   opacity:0;
}

.imgdiv_2 {
   width:301px;
   height:251px;
   background-color:blue;
   opacity:0.2;
}
</style> 
 </head> 
 <body> 
  <div id="container"> 
   <a href="#"> 
    <div class="hover"> 
     <div class="imgdiv"></div> 
    </div> </a> 
   <div class="imgdiv_2"> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials