green_canvas.html 295 B

1234567891011
  1. <html>
  2. <body>
  3. <canvas id="canvas" width="500" height="500"></canvas>
  4. <script>
  5. const canvas = document.getElementById('canvas');
  6. const ctx = canvas.getContext('2d');
  7. ctx.fillStyle = 'rgb(0, 255, 0)';
  8. ctx.fillRect(0, 0, 500, 500);
  9. </script>
  10. </body>
  11. </html>