-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
51 lines (51 loc) · 1.1 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
<!DOCTYPE html>
<html lang="en">
<head>
<title>ysdn.pizza</title>
<meta charset="utf-8"/>
<link rel="shortcut icon" type="image/ico" href="favicon.png" />
<style>
html {
background: #f5d5f5;
}
img {
max-width: 100%;
max-height: 100vh;
}
.gif {
position: absolute;
top: 50%;
left: 50%;
font-size: 80px;
transform: translate(-50%, -50%);
}
.pizza {
position: absolute;
font-size: 24px;
}
</style>
</head>
<body>
<div class="gif">
<img src="finale.gif" />
</div>
<span class="pizza">🍕</span>
<span class="pizza">🍕</span>
<span class="pizza">🍕</span>
<span class="pizza">🍕</span>
<span class="pizza">🍕</span>
<script>
document.addEventListener('DOMContentLoaded', function () {
var pizzas = Array.prototype.slice.call(document.querySelectorAll('.pizza'))
pizzas.forEach(function (el) {
el.style.top = random(0, 100) + 'vh'
el.style.left = random(0, 100) + 'vw'
el.style.fontSize = random(12, 96) + 'px'
})
function random (min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min
}
})
</script>
</body>
</html>