纯CSS实现三角形、扇形
2018-08-02 本文已影响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;
}