updated folder structure
This commit is contained in:
+23
@@ -0,0 +1,23 @@
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
canvas {
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<canvas id="c1"></canvas>
|
||||
<img id="flower" src="flower.jpg" />
|
||||
<script>
|
||||
window.onload = function () {
|
||||
let canvas = document.getElementById("c1");
|
||||
canvas.height = 300;
|
||||
canvas.width = 300;
|
||||
let ctx = canvas.getContext("2d");
|
||||
let myImage = document.getElementById("flower");
|
||||
ctx.drawImage(myImage, 10, 10);
|
||||
};
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user