参考文档:https://www.cnblogs.com/quietxin/p/9418813.html
效果:
wxml页面
<view class="container">
<view class='progress_box'>
<canvas class="progress_bg" canvas-id="canvasProgressbg"> </canvas>
<canvas class="progress_canvas" canvas-id="secondCanvas"></canvas>
</view>
</view>
wxss页面
.progress_box{
position: relative;
width:84px;
height: 84px;
display: flex;
align-items: center;
justify-content: center;
background-color: white;
border-radius: 84px;
}
.progress_bg{
position: absolute;
width:84px;
height: 84px;
}
.progress_canvas{
width:84px;
height: 84px;