第二章 填充颜色
填充颜色
<canvas height
="500" width
="500" id
="canvas"></canvas
>
<script
>
var elem
=document
.getElementById("canvas");
var canvas
=elem
.getContext("2d");
canvas
.fillStyle
="#e4532a";
canvas
.strokeStyle
="blue";
canvas
.globalAlpha
=0.1;
canvas
.strokeRect(10,10,150,150);
canvas
.fillRect(20,20,130,130);
canvas
.clearRect(30,30,110,110);
</script
>
转载请注明原文地址:https://blackberry.8miu.com/read-336.html