CSS mouse hover fallthrough and switch sequence - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Hover

Description

CSS mouse hover fallthrough and switch sequence

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <style>
div {<!--   w w  w .  j  av  a 2s  .  com-->
   position:absolute;
}

.div1 {
   display:block;
   background:red;
   -webkit-transition:left 3s;
   transition:left 3s;
   left:11px;
}

.div2 {
   display:block;
   background:green;
   transition:left 3s;
   left:51px;
}

div.parent:hover .div2 {
   left:0px;
}

div.parent:hover .div1 {
   left:100px;
}
</style> 
 </head> 
 <body> 
  <div class="parent"> 
   <div class="div1">
     Lorem ipsum dolor sit 
   </div> 
   <div class="div2">
     Lorem ipsum dolor sit 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials