创建巨型;
var canvas = document.getElementById("canvas");
var ctx = canvas.getContext("2d");
ctx.fillRect(x,y,width,height)X和Y用于指定矩形左上角也就是相对于原点的位置,width和height用于指定矩形的宽和高。
创建巨型;
var canvas = document.getElementById("canvas");
var ctx = canvas.getContext("2d");
ctx.fillRect(x,y,width,height)X和Y用于指定矩形左上角也就是相对于原点的位置,width和height用于指定矩形的宽和高。
原文:https://www.cnblogs.com/yaomengli/p/8310159.html