HTML CSS examples for CSS Widget:Shape
Create a triangle shape
<html lang="en"> <head> <style> .outerWrap {<!-- w w w.j a v a 2 s . c o m--> position: relative; } .door { width: 0; height: 0; border-top: 500px solid #000; border-right: 900px solid transparent; position: absolute; top:0; left: 0; } .doorLayer { width: 0; height: 0; border-top: 490px solid #ccc; border-right: 890px solid transparent; position: absolute; top:0; left: 5px; } </style> </head> <body translate="no"> <div class="outerWrap"> <div class="door"></div> <div class="doorLayer"></div> </div> </body> </html>