📜  JavaScript .clearRect - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:41.536000             🧑  作者: Mango

代码示例1
var canvas = document.querySelector('canvas');
var ctx = canvas.getContext('2d');

//ctx.clearRect(x, y, width, height);
ctx.clearRect(20, 20, 100, 50);