You might want to make CSS3 here ...
You should just make your code a bit more cross-browser (e.g. by adding -moz-transform , etc.)
And you need to try a little harder to achieve the inner shadow of the letters, but you can do it with
HTML:
<div class='container'> <div class='text'>Hello<br />World<br /> I'm Steffi</div> <div class='triangleA'></div> <div class='triangleB'> <div class='text'> Can you <br /> Help Me Please</div> </div> <div class='triangleC'> <div class='text'> Stackover-<br />flow.com </div> </div> </div>
and CSS:
.container { position: absolute; overflow: hidden; width: 550px; height: 500px; background: #9f9f9f; } div.text { font: bold 45px 'Helvetica'; text-align: left; margin: 120px 0 0 180px; line-height: 40px; color: #3f3f3f; text-transform: uppercase; text-shadow: 0px 1px rgba(255,255,255,.4); } div.triangleA, div.triangleB, div.triangleC { position: absolute; } div.triangleA { background: #afafaf; width: 500px; height: 600px; -webkit-transform: rotate(45deg); top: -350px; left: -230px; } div.triangleB { background: rgba(255,255,255,.4); overflow: hidden; width: 500px; height: 600px; -webkit-transform: rotate(-70deg); top: 200px; left: -230px; } div.triangleB div.text { -webkit-transform: rotate(70deg); margin-left: 240px; margin-top: 550px; width: 500px; } div.triangleC { background: #8f8f8f; -webkit-transform: rotate(-25deg); top: 370px; left: 100px; height: 300px; width: 600px; overflow: hidden; } div.triangleC div.text { -webkit-transform: rotate(25deg); margin: 0; margin-left: 190px; margin-top: 60px; }
Demo: http://jsbin.com/orazod/1/edit
drinchev
source share