<html> | |
<body> | |
<canvas id="c" width=800 height=1000></canvas> | |
<script> | |
var canvas = document.getElementById('c'); | |
let ctx = canvas.getContext("2d"); | |
ctx.fillRect(40, 0, 10, 50); | |
ctx.fillRect(60, 100, 50, 10); | |
ctx.fillRect(200, 200, 20, 10); | |
</script> | |
</body> | |
</html> |