-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
99 lines (82 loc) · 2.25 KB
/
index.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<html>
<head>
<style>
body {
background-color: black;
overflow: hidden;
cursor: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=), none;
user-select: none;
}
.squaregrid {
display: grid;
grid-template: repeat(4, 1fr) / repeat(6, 1fr);
aspect-ratio: 1;
height: 100%;
width: 100%;
align-items: center;
}
.dot {
border-radius: 50%;
background: rgb(29, 27, 27);
font-size: 2em;
width: 50px;
height: 50px;
margin: auto;
}
.on {
background: rgb(89, 204, 106);
box-shadow:
0 0 15px 15px rgb(89, 204, 106),
0 0 40px 40px rgb(49, 141, 63),
0 0 60px 60px rgb(28, 87, 37);
animation: showIn 0.5s;
}
@keyframes showIn {
0% {
opacity: 0.25;
}
100% {
opacity: 1;
}
}
.off {
animation: showOff 0.5s;
}
@keyframes showOff {
0% {
box-shadow:
0 0 15px 15px rgb(89, 204, 106),
0 0 40px 40px rgb(49, 141, 63),
0 0 60px 60px rgb(28, 87, 37);
}
100% {
background: rgb(29, 27, 27);
box-shadow:
0 0 15px 15px rgb(0, 0, 0),
0 0 40px 40px rgb(0, 0, 0),
0 0 60px 60px rgb(0, 0, 0);
}
}
#px_0_0,
#px_1_0,
#px_0_2,
#px_0_4 {
visibility: hidden;
}
</style>
<script src="source.js"></script>
</head>
<body onload="main()">
<div id="squaregridDOM" class="squaregrid">
<script>
const w = 6;
const h = 4;
for (let y = 0; y < h; y++) {
for (let x = 0; x < w; x++) {
document.writeln(`<div id="px_${y}_${x}" class="dot"></div>`);
}
}
</script>
</div>
</body>
</html>