-
Notifications
You must be signed in to change notification settings - Fork 0
/
hanoi.html
59 lines (52 loc) · 1.27 KB
/
hanoi.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Hanoi</title>
<style>
body {
margin: 0;
padding: 0;
width: 100vw;
height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
h1,
h2 {
margin-top: 0;
}
.form {
margin-top: 1rem;
}
.form-item {
margin-bottom: 0.4rem;
}
</style>
</head>
<body>
<h1>Hanoi</h1>
<h2 id="step"><span>0</span> / <span>0</span></h2>
<canvas></canvas>
<form action="" method="get" class="form">
<div class="form-item">
<label for="plate">盘子数量: </label>
<input type="number" name="plate" id="plate" required value="8" />
</div>
<div class="form-item">
<label for="duration">动画时间: </label>
<input
type="number"
name="duration"
id="duration"
required
value="300"
/>
</div>
</form>
<script type="module" src="dist/main.js"></script>
</body>
</html>