Diagonal grid layout with rotation - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Layout

Description

Diagonal grid layout with rotation

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.container {<!--   w  w  w.  j av  a 2 s.  c  o  m-->
   transform:rotate(-46deg);
   -ms-transform:rotate(-46deg);
   -moz-transform:rotate(-46deg);
   -webkit-transform:rotate(-46deg);
   -o-transform:rotate(-46deg);
}

div.container>div {
   background-color:Chartreuse;
   border:3px solid yellow;
   width:81px;
   height:81px;
   float:left;
}
</style> 
 </head> 
 <body> 
  <div class="container"> 
   <div>
     Lorem 
   </div> 
   <div>
     Lorem 
   </div> 
   <div>
     Lorem 
   </div> 
   <div>
     Lorem 
   </div> 
   <div>
     Lorem 
   </div> 
   <div>
     Lorem 
   </div> 
   <div>
     Lorem 
   </div> 
   <div>
     Lorem 
   </div> 
   <div>
     Lorem 
   </div> 
   <div>
     Lorem 
   </div> 
   <div>
     Lorem 
   </div> 
   <div>
     Lorem 
   </div> 
   <div>
     Lorem 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials