Hover to show and slide - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Hover to Show

Description

Hover to show and slide

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">
div {<!--  ww  w.jav a2  s  . c o m-->
   background-color:Chartreuse;
   border-radius:6px;
   width:51px;
   height:61px;
   transition:width 3s;
   -moz-transition:width 3s;
   -webkit-transition:width 3s;
   overflow:hidden;
}

p.op {
   opacity:0.0;
   color:yellow;
   transition:opacity 3s;
   -moz-transition:opacity 3s;
   -webkit-transition:opacity 3s;
   width:121px;
}

div:hover {
   width:121px;
}

div:hover p.op
 {
   opacity:2;
}
</style> 
 </head> 
 <body> 
  <div> 
   <p class="op">Lorem ipsum</p> 
  </div>  
 </body>
</html>

Related Tutorials