![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Canvas
FromNowOnUntilTheEnd
每日记录
展开
-
Cannot read property 'getContext' of null和Failed to execute 'getContext' on 'HTMLCanvasElement':
1、chrome/极速360浏览器报错:Cannot read property 'getContext' of nullfilefox报错:TypeError: c is nullIE Edge:控制台没有报错,但是canvas图像也不显示IE10/IE9报错:SCRIPT5007: 无法获取未定义或 null 引用的属性“getContext”解决方法: 将绘制方法,即绘制...原创 2018-08-24 17:25:08 · 3503 阅读 · 0 评论 -
Canvas常用函数
fillRect(x, y, width, height)绘制一个填充的矩形strokeRect(x, y, width, height)绘制一个矩形的边框clearRect(x, y, width, height)清除指定矩形区域,让清除部分完全透明。fillRect(x, y, width, height)绘制一个填充的矩形strokeRect(x, y, width, he...原创 2018-08-24 17:26:16 · 2761 阅读 · 0 评论