<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<canvas id="canvas" width="1024" height="768" style="border: 1px solid aqua;display:block;margin:auto">当前浏览器不支持,请更换浏览器</canvas>
<script>
window.onload=function(){
var canvas =document.getElementById("canvas");
var context =canvas.getContext("2d");
context.lineWidth=3;
context.strokeStyle="black";
for(var i=0;i<10;i++){
context.beginPath();
context.arc(50+i*100,60,40,2*Math.PI*(i+1)/10);
context.closePath();
context.stroke();
}
}
</script>
</body>
</html>也没提示有啥错误,但网页不显示圆,只有大框
- 1 回答
- 0 关注
- 851 浏览
相关问题推荐
添加回答
举报
0/150
提交
取消