Canvas 应用 互动版

在线工具推荐: Three.js AI纹理开发包 - YOLO合成数据生成器 - GLTF/GLB在线编辑 - 3D模型格式在线转换 - 可编程3D场景编辑器

绘制时钟圆形外框


绘制时钟圆形外框,应用到beginPath(开始),设定lineWidth(线宽),strokeStyle(颜色),最后的arc圆。

ctx.beginPath();
ctx.lineWidth = 14;
ctx.strokeStyle = '#325FA2';
ctx.arc(0,0,142,0,Math.PI*2,true);
ctx.stroke();

ctx.restore();