如果要重新绘制Canvas,clearRect()不好用,将canvas的长宽重新设置成当前长宽即可。 转载于:https://blog.51cto.com/niyabuxing/1173359