我的画布上应该有一个圆圈以及我的车和背景。
我的代码在jsbin上:
http://jsbin.com/hagavoyuwu/3/edit
不起作用的圆圈代码是:
function drawcircle(){
context.beginPath();
context.arc(100,75,50,0,2*Math.PI);
context.stroke();
}
答案 0 :(得分:1)
你需要移动
context.beginPath();
context.arc(100,75,50,0,2*Math.PI);
context.stroke();
到draw
函数