使用路径arc-七彩

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>使用路径</title>
</head>
<body>
    <canvas );

        ctx.beginPath();
        ctx.arc(120, 120,100, 0,120, true);
        ctx.closePath();
        ctx.strokeStyle = "#f00";
        ctx.lineWidth = 20;
        ctx.shadowBlur =15;
        ctx.shadowColor = "#ff0";
        ctx.shadowOffsetX = 7;
        ctx.shadowOffsetY = 7;
        ctx.stroke();

    //for (var i = 0; i < 10; i++) {
    //    ctx.beginPath();
    //    ctx.arc(i * 33, i * 33, (i + 1) * 10, 0, Math.PI * 2, true);
    //    ctx.closePath();
    //    ctx.fillStyle = 'rgba(155,201,93,' + (10 - i) * 0.1 + ')';
    //    ctx.fill();
    //}
</script>
</body>
</html>

相关文章:

  • 2021-07-26
  • 2022-12-23
  • 2021-07-18
  • 2022-02-15
  • 2022-12-23
  • 2021-12-02
  • 2022-12-23
  • 2021-09-13
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-18
相关资源
相似解决方案