-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinfo.html
34 lines (34 loc) · 935 Bytes
/
info.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Info</title>
<style type="text/css">
body {
margin: 0;
background-color: rgb(53, 48, 48);
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
}
canvas {
border: 0px solid snow;
}
</style>
</head>
<body>
<canvas id="UI" width="1024" height="576"></canvas>
<script>
const canvas = document.getElementById("UI");
const ctx = canvas.getContext("2d");
const image = new Image();
image.src = "./img/info.jpg";
//image.src = "./img/feedback.jpg";
image.onload = function() {
ctx.drawImage(image, 0, 0); // 绘制图片到 canvas 的坐标 (0, 0)
}
</script>
</body>
</html>