Transform: scale and positioning image - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Position

Description

Transform: scale and positioning image

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">
.thumb>a .img-cover {
   -webkit-transition:all 2.3s ease-out;
   border-radius:6px;
   -webkit-transform:scale(2);
}

.img-cover {<!--from   w  w w.  ja v a2 s .co m-->
   position:relative;
   overflow:hidden;
   z-index:100;
}

.img-cover:before {
   position:absolute;
   top:0;
   left:0;
   right:0;
   bottom:0;
   content:"";
   box-shadow:inset 0px 0 100px Chartreuse;
   z-index:201;
}

.thumb>a:hover img {
   -webkit-transform:scale(2.2);
}
</style> 
 </head> 
 <body> 
  <div class="container"> 
   <article class="thumb"> 
    <a href="#"> 
     <div class="img-cover"> 
      <img src="https://www.java2s.com/style/demo/Firefox.png"> 
     </div> <span>Lorem ipsu</span> </a> 
   </article> 
  </div>  
 </body>
</html>

Related Tutorials