How can I draw a left pointing triangle using CSS?

血红的双手。 提交于 2019-12-31 03:10:29

问题


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/

.left-corner {
    width: 0;
    height: 0;
    border-bottom: 15px solid #000;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    position: relative;
}
<div class="left-corner"></div>

回答1:


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!



来源:https://stackoverflow.com/questions/20076388/how-can-i-draw-a-left-pointing-triangle-using-css

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!