Skewing elements in column layout - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Column Layout

Description

Skewing elements in column layout

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">

.outer {<!-- www.j av a2 s  . c o m-->
   background-color: yellow;
   margin: 50px;
   height: 200px;
   width: 510px;
}
.inner {
   float: left;
   width: 150px;
   transform: skewX(-15deg);
   background-color: red;
   height: 100%;
   margin: 0 10px;
}
.text {
   transform: skewX(15deg);
}


      </style> 
 </head> 
 <body> 
  <div class="outer"> 
   <div class="inner"> 
    <div class="text">
      skewed 1 
     <img src="https://www.java2s.com/style/demo/Firefox.png"> 
    </div> raw text 1 
    <img src="https://www.java2s.com/style/demo/Opera.png"> 
   </div> 
   <div class="inner"> 
    <div class="text">
      skewed 2 
     <img src="https://www.java2s.com/style/demo/Safari.png"> 
    </div> raw text 2 
    <img src="https://www.java2s.com/style/demo/Opera.png"> 
   </div> 
   <div class="inner"> 
    <div class="text">
      skewed 3 
     <img src="https://www.java2s.com/style/demo/Google-Chrome.png"> 
    </div> raw text 3 
    <img src="https://www.java2s.com/style/demo/Safari.png"> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials