美文网首页
纯CSS实现三角形、扇形

纯CSS实现三角形、扇形

作者: 自律财富自由 | 来源:发表于2018-08-02 17:48 被阅读0次

html:

<div class="triangle"></div>
<div class="arc"></div>
.triangle {
    width: 0;
    height: 0;
    border-width:50px;
    border-style: solid;
    border-color: #f00 transparent transparent;
}
.arc {
    //triangle的代码 + border-radius: 50%
    width: 0;
    height: 0;
    border-width:50px;
    border-style: solid;
    border-color: #f00 transparent transparent;
}

相关文章

网友评论

      本文标题:纯CSS实现三角形、扇形

      本文链接:https://www.haomeiwen.com/subject/avusvftx.html