-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
48 lines (48 loc) · 1.4 KB
/
index.html
File metadata and controls
48 lines (48 loc) · 1.4 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Fibonacci</title>
<style>
body {
display: flex;
flex-direction: column;
gap: 1rem;
padding: 2rem;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.note {
background: lightgray;
padding: 2.5rem 2rem 2rem 2rem;
border: 2px solid #00000033;
border-radius: 12px;
position: relative;
corner-shape: superellipse(1);
}
.note::after {
content: 'Note';
position: absolute;
top: 2px;
left: 2px;
background-color: rgb(255, 255, 255);
padding: .25rem .5rem;
corner-shape: superellipse(1);
border-radius: 10px;
}
#canvas {
width: 800px;
}
</style>
</head>
<body>
<h1>Fibonacci Sequence Generator</h1>
<canvas id="canvas" width="800" height="400"></canvas>
<label for="sequence">n of entries in sequence:</label>
<input type="range" id="sequence" min="2" max="15" step="1" value="5" />
<p class="note">
Notice that the number of blocks that appear on the screen is actually one less then the set "number of entries". This is not a bug but rather a consequence of the fact that the first number of the Fibonacci sequence is always equal to zero.
</p>
<script type="module" src="index.js"></script>
</body>
</html>