Thoughtworks interview question

How to make a triangle in CSS?

Interview Answers

Anonymous

Aug 18, 2019

Border property. border-top:transprent; border-bottom:transprent; border-left:20px solid red;

Anonymous

Apr 6, 2020

.right-side { border-right: 5px solid black; transform: skewX(-45deg); height: 100px; } .left-side { border-left: 5px solid black; transform: skewX(45deg); height: 100px; } .bottom-side { border-bottom: 5px solid black; width: 200px; }