编辑下面的代码:【加编码】
<html> <body> <canvas id="myCanvas">Your browser does not support the HTML5 canvas tag.</canvas> <script> var c=document.getElementById('myCanvas'); var ctx=c.getContext('2d'); ctx.fillStyle='#FF0000'; ctx.fillRect(0,0,80,100); </script> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂