画一条直线
画一个矩形
const canvas = document.getElementById('canvas');
console.dir(canvas);
const ctx = canvas.getContext('2d');
console.dir(ctx);
ctx.fillStyle = "red";
ctx.fillRect(10, 10, 100, 100);
const canvas = document.getElementById('canvas');
console.dir(canvas);
const ctx = canvas.getContext('2d');
console.dir(ctx);
ctx.fillStyle = "red";
ctx.fillRect(10, 10, 100, 100);