maaike's code samples
This commit is contained in:
Executable
+20
@@ -0,0 +1,20 @@
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
canvas {
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<canvas id="c1"></canvas>
|
||||
<script>
|
||||
let canvas = document.getElementById("c1");
|
||||
let ctx = canvas.getContext("2d");
|
||||
canvas.width = 500; //px
|
||||
canvas.height = 500; //px
|
||||
//ctx.fillStyle = "pink";
|
||||
ctx.fillRect(20, 40, 100, 100);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user