-
Notifications
You must be signed in to change notification settings - Fork 0
/
textAnimation.html
79 lines (63 loc) · 1.83 KB
/
textAnimation.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title></title>
<style>
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
*{
margin: 0;
padding: 0;
}
body{
display: flex;
justify-content: center;
align-items: center;
width: 100vw;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
font-family: 'Poppins', sans-serif;
font-size: 40px;
background: rgb(79,127,245);
background: linear-gradient(90deg, rgba(79,127,245,1) 0%, rgba(0,212,255,1) 100%);
}
.character{
margin: 20px;
width: fit-content;
transition: 0.2s ease-in-out;
animation: up linear infinite 1s;
}
@keyframes up {
0%{
transform: translateY(0px);
}
50%{
transform: translateY(-20px);
}
100%{
transform: translateY(0px);
}
}
.character:hover{
font-size: 120px;
color: #ffffff;
}
</style>
</head>
<body>
<div class="container">
</div>
</body>
<script>
let text = ['K','I','T','T','Y','🤝','L','I','N','U','X'];
for(let i = 0; i<=10; i++){
let character = document.createElement("h1");
character.classList.add("character");
character.innerText = text[i];
document.body.appendChild(character);
}
</script>
</html>