画一个扇形图,使用常规方法可能很难画,但是用锥形渐变的话非常好画
- <style>
- .pattern{
- width: 100px; height: 100px;
- border-radius: 50%;
- background: conic-gradient(
- yellow 30deg , black 30deg ,
- black 90deg , yellow 90deg ,
- yellow 150deg , black 150deg ,
- black 210deg , yellow 210deg ,
- yellow 270deg , black 270deg ,
- black 330deg , yellow 330deg ,
- yellow 360deg );
- }
- style>
- <body>
- <div class="pattern">div>
- body>