CanvasContext.clearRect(number x, number y, number width, number height) 矩形路径左上角的横坐标 矩形路径的宽度 示例代码clearRect 并非画一个白色的矩形在地址区域,而是清空,为了有直观感受,对 canvas 加了一层背景色。 ctx.setFillStyle('blue')