请老师检查,谢谢
来源:7-4 编程练习
qq_慕移动3101913
2020-03-02 20:00:46
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>阴影</title>
<style>
canvas{background-color:lightblue;}
</style>
</head>
<body>
<canvas id="canvas" width="800px" height="800px">
您的浏览器不支持canvas
</canvas>
<script>
var canvas=document.getElementById("canvas");
var ctx=canvas.getContext("2d");
//在此处补充代码
//阴影的X偏移
ctx.shadowOffsetX = -15;
//阴影的Y偏移
ctx.shadowOffsetY = -15;
//阴影颜色
ctx.shadowColor = 'rgba(255,215,0,.7)';
//隐藏模糊度
ctx.shadowBlur = 10;
//绘制圆形
ctx.arc(400,400,50,0,Math.PI * 2, true);
//圆形颜色
ctx.fillStyle = 'RGB(255,69,0)';
ctx.fill();
</script>
</body>
</html>1回答
同学你好,效果正确,继续加油,祝学习愉快~