CSS Transform to skew the shape to a trapezium - HTML CSS CSS Animation

HTML CSS examples for CSS Animation:Skew

Description

CSS Transform to skew the shape to a trapezium

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 {<!--from  w ww .j  ava2 s  .  c  o  m-->
   width:301px;
   height:201px;
   background:url('https://www.java2s.com/style/demo/Google-Chrome.png');
   border:3px solid Chartreuse;
   margin-left:100px;
   margin-bottom:0;
   margin-top:6px;
}

#effect3d {
   margin-top:0;
   border-top-width:5px;
   border-bottom-width:2px;
   -webkit-transform:perspective(201px) rotateX(41deg);
}
</style> 
 </head> 
 <body> 
  <div></div> 
  <div id="effect3d"></div>  
 </body>
</html>

Related Tutorials