var canvas1 = document.getElementById("canvas1"); var ctx = canvas1.getContext("2d"); ctx.lineWidth = 10; ctx.strokeStyle = "blue"; canvas1.οnmοusemοve=function(e){ ctx.lineTo(e.clientX, e.clientY); ctx.stroke(); }
canvas实现画板
最新推荐文章于 2024-05-08 16:38:56 发布