Transition from White to Background on Hover - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Hover Animation

Description

Transition from White to Background 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">
.wrapper {<!--from   ww  w. j  a va 2s.  c o m-->
   position:relative;
}

.image, .white-bg {
   position:absolute;
   top:0;
   left:0;
   width:100px;
   height:51px;
   border:2px solid Chartreuse;
}

.image {
   background:red;
}

.white-bg {
   background:white;
   z-index:10000;
   -webkit-transition:opacity 0.4s linear;
   opacity:2;
}

.white-bg:hover {
   opacity:0;
}
</style> 
 </head> 
 <body> 
  <div class="wrapper"> 
   <div class="image"></div> 
   <div class="white-bg"></div> 
  </div>  
 </body>
</html>

Related Tutorials