How can I draw a left pointing triangle using CSS?

前端 未结 1 992
灰色年华
灰色年华 2021-01-22 02:00

It has been a long time since I built this triangle which points up. How can I alter my CSS to point the corner left?

http://jsfiddle.net/3sP8q/

相关标签:
1条回答
  • 2021-01-22 02:14

    Here is how:

    .left-corner {
        width: 0;
        height: 0;
        border-top: 50px solid transparent;
        border-right: 100px solid red;
        border-bottom: 50px solid transparent;
    }
    <div class="left-corner"></div>

    Use CSS-Tricks, it helps a lot!

    0 讨论(0)
提交回复
热议问题