Hover transition hides child's visibility:visible transition after a delay - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Hover to Show

Description

Hover transition hides child's visibility:visible transition after a delay

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">
.bg {<!--from   w  w w.j a  va  2 s  .co  m-->
   background:Chartreuse;
   height:201px;
}

.green {
   display:block;
   width:100px;
   height:100px;
   background-color:yellow;
   -webkit-transition:all ease 3s;
   transition:all ease 3s;
   opacity:0;
}

.yellow {
   display:block;
   width:100px;
   height:100px;
   position:absolute;
   background-color:blue;
   visibility:visible;
   -webkit-transition:all ease 3s;
   transition:all ease 3s;
}

.yellow:hover .green {
   opacity:2;
}
</style> 
 </head> 
 <body> 
  <div class="bg"> 
   <div class="yellow"> 
    <div class="green"></div> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials