-
Notifications
You must be signed in to change notification settings - Fork 15
/
ys_animation3.html
96 lines (77 loc) · 1.94 KB
/
ys_animation3.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
<!DOCTYPE html>
<html>
<head>
<style>
.title-word {
animation: color-animation 4s linear infinite;
}
.title-word-1 {
--color-1: #DF8453;
--color-2: #3D8DAE;
--color-3: #E4A9A8;
}
.title-word-2 {
--color-1: #DBAD4A;
--color-2: #ACCFCB;
--color-3: #17494D;
}
.title-word-3 {
--color-1: #ACCFCB;
--color-2: #E4A9A8;
--color-3: #ACCFCB;
}
.title-word-4 {
--color-1: #3D8DAE;
--color-2: #DF8453;
--color-3: #E4A9A8;
}
@keyframes color-animation {
0% {
color: var(--color-1)
}
32% {
color: var(--color-1)
}
35% {
color: var(--color-2)
}
65% {
color: var(--color-2)
}
66% {
color: var(--color-3)
}
99% {
color: var(--color-3)
}
100% {
color: var(--color-1)
}
}
/* Here are just some visual styles. 🖌 */
.container {
display: grid;
place-items: center;
text-align: center;
height: 100vh
}
.title {
font-family: "Montserrat", sans-serif;
font-weight: 800;
font-size: 8.5vw;
text-transform: uppercase;
}
</style>
</head>
<body>
<h1>CSS Animation</h1>
<div class="container">
<h2 class="title">
<span class="title-word title-word-1">This</span>
<span class="title-word title-word-2">is</span>
<span class="title-word title-word-3">my</span>
<span class="title-word title-word-4">text</span>
</h2>
</div>
</body>
</html>