Line 1: | Line 1: | ||
<html> | <html> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<body> | <body> | ||
− | <canvas id=" | + | <canvas id="myCanvas" width="200" height="100" |
− | <script | + | style="border:1px solid #c3c3c3;"> |
+ | Your browser does not support the canvas element. | ||
+ | </canvas> | ||
+ | |||
+ | <script> | ||
+ | var canvas = document.getElementById("myCanvas"); | ||
+ | var ctx = canvas.getContext("2d"); | ||
+ | ctx.fillStyle = "#FF0000"; | ||
+ | ctx.fillRect(0,0,150,75); | ||
+ | </script> | ||
</body> | </body> | ||
</html> | </html> |
Revision as of 01:41, 1 November 2017