20 lines
495 B
HTML
20 lines
495 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
</head>
|
|
<body>
|
|
<canvas id="canvas" width="700" height="500" style="width: 700px; height; 500px;"></canvas>
|
|
<script>
|
|
let canvas = document.getElementById("canvas");
|
|
let context = canvas.getContext("2d");
|
|
context.lineWidth = 2;
|
|
context.strokeStyle = "green";
|
|
context.strokeRect(200, 125, 100, 100);
|
|
context.strokeRect(300, 125, 100, 100);
|
|
context.strokeRect(320, 125, 20, 100);
|
|
context.strokeRect(400, 125, 100, 100);
|
|
</script>
|
|
</body>
|
|
</html>
|