Adding border to CSS triangle [duplicate]
问题 This question already has answers here : CSS triangle custom border color (5 answers) Closed 4 years ago . I have a triangle <div class="triangle-left"></div> .triangle-left { width: 0; height: 0; border-top: 22px solid transparent; border-bottom: 22px solid transparent; border-right: 22px solid white; } How do I draw the outline of a CSS triangle, considering border itself is used to make the triangle? External divs? 回答1: One way to do it is the create an inner triangle which is smaller.