美文网首页
css3 实现扇形组圆

css3 实现扇形组圆

作者: 马贞晓 | 来源:发表于2018-05-14 18:19 被阅读0次
WX20180514-181308@2x.png
   let w = Math.tan(Math.PI/len)*width/2+"px";
       //得到邻边长度,border-top-width为半径,用邻边设置透明生成三角形
       return startList.map((el,ind)=>{
            
           return <li className={"li"+(ind%2==0? "1":"2")} style={{transform:`rotate(${ind*r}turn)`}} key={ind}>
                        <img src="" width="20" height="20" />
                        <p className="bg" style={{borderLeftWidth:w,borderRightWidth:w}} ></p>
                        <p>{el.Name}</p>
                    </li>
       })

相关文章

网友评论

      本文标题:css3 实现扇形组圆

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