2017/12/6 canvas清空页面的三种办法
1.clearRect()方法
clearRect(x1,y1,width,height)
2.重设宽或高
context.height = context.height;
3.用颜色覆盖
context.fillRect(0,0,context.widht,context.height);
1.clearRect()方法
clearRect(x1,y1,width,height)
2.重设宽或高
context.height = context.height;
3.用颜色覆盖
context.fillRect(0,0,context.widht,context.height);