CSS Enlarge on Hover Effect - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Hover Effect

Description

CSS Enlarge on Hover Effect

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">
* {<!--from  ww  w.java  2  s . co  m-->
   margin:0;
   padding:0;
}

.wrapper {
   margin:0px auto;
   background:Chartreuse;
   width:1025px;
   position:relative;
   overflow:hidden;
   color:yellow;
   z-index:0;
   overflow:visible;
}

.photos {
   position:relative;
}

.photos>div {
   background-color:blue;
   border:3px solid pink;
   float:left;
   height:100px;
   margin:6px;
   overflow:visible;
   position:relative;
   width:301px;
   z-index:0;
   -webkit-transform:scale(2.0);
   -moz-transform:scale(2.0);
   -ms-transform:scale(2.0);
   -o-transform:scale(2.0);
   transform:scale(2.0);
   -webkit-transition-duration:0.6s;
   -moz-transition-duration:0.6s;
   -ms-transition-duration:0.6s;
   -o-transition-duration:0.6s;
   transition-duration:0.6s;
}

.photos>div img {
   width:100%;
}

.photos>div:hover {
   z-index:11;
   -webkit-transform:scale(3.0);
   -moz-transform:scale(3.0);
   -ms-transform:scale(3.0);
   -o-transform:scale(3.0);
   transform:scale(3.0);
}
</style> 
 </head> 
 <body> 
  <div class="wrapper"> 
   <!-- panel with buttons --> 
   <div class="photos"> 
    <div> 
     <img src="https://www.java2s.com/style/demo/Google-Chrome.png"> 
     <div></div> 
    </div> 
    <div> 
     <img src="https://www.java2s.com/style/demo/Google-Chrome.png"> 
    </div> 
    <div> 
     <img src="https://www.java2s.com/style/demo/Firefox.png"> 
    </div> 
    <div> 
     <img src="https://www.java2s.com/style/demo/Opera.png"> 
     <div></div> 
    </div> 
    <div> 
     <img src="https://www.java2s.com/style/demo/InternetExplorer.png"> 
     <div></div> 
    </div> 
    <div> 
     <img src="https://www.java2s.com/style/demo/InternetExplorer.png"> 
     <div></div> 
    </div> 
    <div> 
     <img src="https://www.java2s.com/style/demo/Opera.png"> 
     <div></div> 
    </div> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials