-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathAnimation_Text.html
90 lines (89 loc) · 2.57 KB
/
Animation_Text.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Animated Text Using Anime Js</title>
<style>
@import url('https://fonts.googleapis.com/css2?family=Quicksand&display=swap');
*{
margin: 0;
padding: 0;
font-family: "QuickSand",sans-serif;
user-select: none;
box-sizing: border-box;
}
section{
position: relative;
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
background:#0e1623;
overflow: hidden;
}
section .text{
position: relative;
font-size: 5em;
text-align: center;
color: #00fe77;
-webkit-box-reflect: below -0.46em linear-gradient(transparent,#0004);
}
section .text span{
position: relative;
display: inline-block;
}
</style>
</head>
<body>
<section>
<h2 class="text">AnimeJS Text Effects</h2>
</section>
<script src="assets/anime/animemin.js"></script>
<script>
// This is The Script for Splitting The Word
const text = document.querySelector(".text");
text.innerHTML = text.textContent.replace(/\S/g,"<span>$&</span>")
anime.timeline({
loop:true
})
.add({
targets:".text span",
translateY: [600,0],
scale:[10,1],
opacity:[0,1],
easing:"easeOutExpo",
duration:1500,
delay:anime.stagger(100),
})
.add({
targets:".text span",
translateX: [0,1000],
scale:[1,1],
opacity:[1,0],
easing:"easeOutExpo",
duration:2000,
delay:anime.stagger(100),
})
.add({
targets:".text span",
translateX: [1000,0],
scale:[1,1],
opacity:[0,1],
easing:"easeOutExpo",
duration:2000,
delay:anime.stagger(100),
})
.add({
targets:".text span",
translateX: [0,0],
scale:[1,50],
opacity:[1,0],
easing:"easeOutExpo",
duration:2000,
delay:anime.stagger(100),
})
</script>
</body>
</html>