"link" 2 divs's hover state - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Hover Link

Description

"link" 2 divs's hover state

Demo Code

ResultView the demo in separate window

<html lang="en">
 <head> 
  <title>Lorem ipsu</title> 
  <style>
.bg {<!--  www.  j  a va 2  s .c  o  m-->
   background-color:Chartreuse;
   width:201px;
   height:201px;
}

.topbar {
   width:201px;
   height:21px;
   background-color:yellow;
}

.bottombar {
   width:201px;
   height:21px;
   background-color:blue;
   top:181px;
   position:absolute;
}

.topbar:hover,
.topbar:hover .bottombar {
   background-color:pink;
}
</style> 
 </head> 
 <body translate="no"> 
  <div class="bg"> 
   <div class="topbar"> 
    <div class="bottombar"></div> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials