HTML CSS examples for CSS Layout:Box
create a box with slanted edges
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> .trapezoid {<!--from ww w .j a v a 2 s.c o m--> border-bottom:100px solid Chartreuse; border-left:26px solid yellow; border-right:26px solid blue; transform:rotate(181deg); height:0; width:126px; } .divtext { transform:rotate(181deg); color:pink; } </style> </head> <body> <h2>Lorem ipsum d</h2> <div class="trapezoid "> <span class="divtext">Lorem </span> </div> </body> </html>