Hi,歡迎訪問前端老白
<canvas id="myCanvas" width="200" height="100"></canvas>
var canvas = document.getElementById("myCanvas"); var ctx = canvas.getContext("2d");
ctx.fillStyle = "red"; ctx.fillRect(20, 20, 150, 75);
ctx.font = "30px Arial"; ctx.fillText("Hello World", 10, 50); ctx.moveTo(0, 0); ctx.lineTo(200, 100); ctx.stroke();
老白網(wǎng)絡(luò) (http://www.lofty888.cn/) 前端 后端 zblog主題.網(wǎng)站地圖xml