-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
82 lines (76 loc) · 2.37 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
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<title>Bendimester23</title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Nunito&display=swap" rel="stylesheet">
<!-- Cloudflare Web Analytics --><script defer src='https://static.cloudflareinsights.com/beacon.min.js' data-cf-beacon='{"token": "649d80cf398c4597970ea9d0a8c55848"}'></script><!-- End Cloudflare Web Analytics -->
<style>
#container {
position: absolute;
height: 100%;
width: 100%;
background-color: #54a0ff;
}
#container h1 {
position: absolute;
color: #fff;
}
* {
font-family: 'Nunito', sans-serif;
padding: 0px;
margin: 0px;
}
</style>
</head>
<body>
<div id="container">
<h1 id="text"><a href="https://edwardbot.tk">Bendimester23</a></h1>
</div>
<script>
let vX = 0;
let vY = 0;
let pX = 0;
let pY = 0;
let wX = 0;
let wY = 0;
let colors = [
"#1dd1a1",
"#48dbfb",
"#ff6b6b",
"#feca57",
"#ff9ff3",
"#00d2d3",
"#54a0ff",
"#5f27cd",
"#c8d6e5",
"#576574"
]
window.onload = function() {
const text = document.getElementById('text');
const back = document.getElementById('container')
vX = 1;
vY = 1;
wX = window.innerWidth;
wY = window.innerHeight;
setInterval(() => {
pX += vX;
pY += vY;
text.style.top = pY + "px";
text.style.left = pX + "px";
if (pX > wX - 211 || pX < 0) {
vX = -vX;
back.style.backgroundColor = colors[Math.floor(Math.random() * colors.length)];
}
if (pY > wY - 43 || pY < 0) {
vY = -vY;
back.style.backgroundColor = colors[Math.floor(Math.random() * colors.length)];
}
}, 10);
}
</script>
</body>
</html>