Honestly, I don’t know why people keep using these shapes when you can write semantic HTML using SVG .
.triangle {
height: 200px;
width: 200px;
color: #007bff;
-webkit-filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, .5));
filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, .5));
}
<svg class="triangle">
<polygon points="0,0 200,0 0,200" fill="currentColor" />
</svg>
Run codeHide resultRicky source
share