JavaScript html5 canvas画布中删除一个块区域的方法

本文实例讲述了html5 canvas画布中删除一个块区域的方法分享给大家供大家参考,具体如下:

运行效果截图如下:

附:图中,黑色小方块即为删除掉的块区域

具体代码如下:

index.html:

rush:xhtml;"> canvas中<a href="https://www.jb51.cc/tag/shanchu/" target="_blank" class="keywords">删除</a>一块区域