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);

posted @ 2017-12-06 09:10  赵冠磊  阅读(1677)  评论(0)    收藏  举报