设计图上给的样式代码如下:
left: 31.25px;
top: 356.75px;
width: 177.5px;
height: 177.5px;
opacity: 1;
border-radius: 240px;
transform: rotate(-90deg);
background: conic-gradient(from 90deg at 50% 50%, rgba(105, 242, 245, 0) 32.26%, rgba(105, 242, 245, 1) 36.57%);
你先去看下canvas吧,这东西啥都能画出来呀,就相当于给了你一支笔随便想画啥都可以:const gradient = ctx.createLinearGradient(0, 0, canvas.width, canvas.height); gradient.addColorStop(0,'red'); gradient.addColorStop(0.5, 'blue'); gradient.addColorStop(1, 'green');