hmm, you can use css3 transforms (rotation):
HTML:
<div class="shape1"> <div class="shape1-content"> ... </div> </div>
CSS:
.shape1 { -webkit-transform: rotate(45deg); } .shape1-content { -webkit-transform: rotate(-45deg); }
Of course, you use other styles (position: absolute and others).
UPDATE:
copy'n'paste this code to see a live example:
<html> <head> <style> .wrapper { border: 1px solid #ff8888; height: 480px; left: 50%; margin: -240px 0 0 -320px; overflow: hidden; position: absolute; top: 50%; width: 640px; } .shape1 { -webkit-transform: rotate(15deg); -moz-transform: rotate(15deg); background-color: #fff; border: 1px solid black; height: 50%; left: -25%; position: absolute; top: 70%; width: 150%; } .shape1-content { -webkit-transform: rotate(-15deg); -moz-transform: rotate(-15deg); padding-left: 230px; } .shape2 { -webkit-transform: rotate(15deg); -moz-transform: rotate(15deg); background-color: #fff; border: 1px solid #88ff88; bottom: 244px; height: 100%; position: absolute; right: 50%; width: 100%; } .shape2-content { -webkit-transform: rotate(-15deg); -moz-transform: rotate(-15deg); bottom: 10px; position: absolute; right: 10px; } .shape3 { -webkit-transform: rotate(30deg); -moz-transform: rotate(30deg); border: 1px solid #8888ff; bottom: 40%; height: 100%; position: absolute; right: 20%; width: 100%; } .shape3-content { -webkit-transform: rotate(-30deg); -moz-transform: rotate(-30deg); bottom: 50%; position: absolute; right: 10px; } </style> </head> <body> <div class="wrapper"> <div class="shape3"> <div class="shape3-content">Hi there!</div> </div> <div class="shape1"> <div class="shape1-content">Hi there!</div> </div> <div class="shape2"> <div class="shape2-content">Hi there!</div> </div> </div> </body> </html>
source share