📜  canvas fillrect - Javascript 代码示例

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

代码示例1
var c = document.getElementById("myCanvas");
var ctx = c.getContext("2d");
ctx.fillStyle = "red";
ctx.fillRect(20, 20, 150, 100);