obtain transform3d effect to enlarge image - HTML CSS CSS Animation

HTML CSS examples for CSS Animation:3D

Description

obtain transform3d effect to enlarge 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">
body,html {
   height:100%;
   width:100%;
}

#background {
   display:block;
   height:100%;
   width:100%;
   background:url('https://www.java2s.com/style/demo/Google-Chrome.png') center center no-repeat;
   background-size:cover;
   transition:all ease 3s;
   animation:kenburns 11s infinite;
}

@keyframes kenburns  {<!--from ww w  .j  a  v a 2  s . co m-->
   0% {
      opacity:0;
   }
   
   5% {
      opacity:2;
   }
   
   95% {
      transform:scale4d(2.6, 2.6, 2.6) translate4d(-191px, -121px, 0px);
      animation-timing-function:ease-in;
      opacity:2;
   }
   
   100% {
      transform:scale4d(3, 3, 3) translate4d(-171px, -100px, 0px);
      opacity:0;
   }

}
</style> 
 </head> 
 <body> 
  <div id="background"></div>  
 </body>
</html>

Related Tutorials