喝奶茶的猫
2015-02-06 18:22
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>CanvasArc</title>
</head>
<body>
<canvas id="canvas" style="display: block;border: 1px solid #aaa;margin: 50px auto">
如果浏览器不支持请更换浏览器!!!
</canvas>
<script>
var canvas=document.getElementById("canvas");
canvas.width=800;
canvas.height=800;
var context=canvas.getContext('2d');
for(var i=0;i<10;i++){
context.arc(50+i*100,200,40,0,2*Math.PI*(i+1)/10,true);
context.closePath();
context.stroke();
}
</script>
</body>
</html>
请哪位同学帮我运行一下看看 问题在哪里 谢谢
beginPath() 呢?
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>CanvasArc</title> </head> <body> <canvas id="canvas" style="display: block;border: 1px solid #aaa;margin: 50px auto"> 如果浏览器不支持请更换浏览器!!! </canvas> <script> var canvas=document.getElementById("canvas"); canvas.width=800; canvas.height=800; var context=canvas.getContext('2d'); for(var i=0;i<10;i++){ context.beginPath(); context.arc(50+i*100,200,40,0,2*Math.PI*(i+1)/10,true); context.closePath(); context.stroke(); } </script> </body> </html>
炫丽的倒计时效果Canvas绘图与动画基础
96746 学习 · 1000 问题
相似问题