border-width
(20px
).border-color
. The adjacent borders (i.e. left and right) should have a border-color
of transparent
.border-width
values will change the proportions of the triangle.<div class="triangle"></div>
.triangle { width: 0; height: 0; border-top: 20px solid #9C27B0; border-left: 20px solid transparent; border-right: 20px solid transparent; }
Subscribe to get resources directly to your inbox. You won't receive any spam! ✌️