CSS: transition opacity on mouse-out - HTML CSS CSS Property

HTML CSS examples for CSS Property:opacity

Description

CSS: transition opacity on mouse-out

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">
.item {<!-- ww w .j a  v a  2  s  . c  o  m-->
   height:201px;
   width:201px;
   background:red;
   -webkit-transition:opacity 2s ease-in-out;
   -moz-transition:opacity 2s ease-in-out;
   -ms-transition:opacity 2s ease-in-out;
   -o-transition:opacity 2s ease-in-out;
   transition:opacity 2s ease-in-out;
}

.item:hover {
   zoom:2;
   filter:alpha(opacity=51);
   opacity:0.6;
}
</style> 
 </head> 
 <body> 
  <div class="item"> 
  </div>  
 </body>
</html>

Related Tutorials