Show iframe on hover - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Hover to Show

Description

Show iframe 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">
.a {<!--from  w ww . j a  va2 s  .c  o m-->
   border:solid blue;
   height:21px;
}

.b {
   display:none;
   border:solid green;
}

.a:hover + .b {
   display:block;
}

.b:hover {
   display:block;
}

.b iframe {
   position:relative;
   z-index:-2;
}
</style> 
 </head> 
 <body> 
  <div class="a">
    Lorem 
  </div> 
  <div class="b"> 
   <iframe width="560" height="315" src="http://www.youtube.com/" frameborder="0" allowfullscreen></iframe> 
  </div>  
 </body>
</html>

Related Tutorials