Make a rectangle / cone with only css [duplicate]

1

Would you like to type a rectangle / cone only using css? As in the image below:

I need to use the background of a div or button, but it has to be in that format.

    
asked by anonymous 16.03.2016 / 19:38

1 answer

2

.trapezio { 
  border-top: 50px solid blue; 
  border-left: 25px solid transparent; 
  border-right: 25px solid transparent; 
  height: 0; 
  width: 50px; 
}
<div class="trapezio"></div>

Here's an excellent reference on how to draw shapes using only or CSS

    
16.03.2016 / 20:11