| 1 |
<html> |
| 2 |
<body> |
| 3 |
<canvas id="canvas"></canvas> |
| 4 |
<script> |
| 5 |
const canvas = document.getElementById('canvas') |
| 6 |
const ctx = canvas.getContext('2d') |
| 7 |
|
| 8 |
ctx.fillStyle = 'rgba(255,0,0,255)' |
| 9 |
ctx.fillRect(10, 10, 150, 100) |
| 10 |
</script> |
| 11 |
</body> |
| 12 |
</html> |