复制代码
代码如下:

var canvas=document.getElementById('myCanvas');
var ctx= canvas.getContext('2d');
ctx.fillStyle="#99FF66";
ctx.fillRect(10,10,15,80);
//ctx.fillRect(10,80,15,80);
var canvas=document.getElementById('myCanvas');
var ctx= canvas.getContext('2d');
ctx.fillStyle="#99FF66";
ctx.fillRect(60,10,15,80);
var canvas=document.getElementById('myCanvas');
var ctx= canvas.getContext('2d');
ctx.fillStyle="#0033CC";
ctx.fillRect(26,27,33,50);
ctx.fillStyle="red";
ctx.beginPath();
ctx.arc(43,52,17,0,Math.PI*2,true);
ctx.closePath();
ctx.fill();
ctx.strokeTyle="#CCCC00";
ctx.lineWidth=2;
ctx.moveTo(43,52);
ctx.lineTo(43,10);
ctx.stroke();

点赞(93)

评论列表共有 0 条评论

立即
投稿
返回
顶部