-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyles.css
More file actions
134 lines (123 loc) · 2.65 KB
/
styles.css
File metadata and controls
134 lines (123 loc) · 2.65 KB
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
@font-face {
font-family: "MaokenAssortedSans";
src:
url("/fonts/MaokenAssortedSans.ttf") format("ttf");
}
:root {
font-family: "MaokenAssortedSans";
}
body, html {
margin: 0;
padding: 0;
height: 100%;
background-color: transparent;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
}
.container {
position: relative;
/* width: 80%; */
max-width: 1920px;
text-align: center;
/* overflow: hidden; */
}
.text-box {
font-size: 40px;
font-family: Arial, sans-serif;
justify-content: center;
/* height: 100vh; */
align-items: center;
white-space: nowrap;
display: inline-block;
font-family: "MaokenAssortedSans";
/* opacity: 0; */
/* overflow: hidden; */
top: 20px;
}
.visible-text {
position: static;
/* text-align: center; */
white-space: nowrap;
/* overflow: hidden; */
display: inline-block;
display: flex; /* 子元素水平排列 */
flex-wrap: wrap; /* 自动换行 */
justify-content: center; /* 保持内容水平居中 */
padding: 20px;
/* 文字描边 */
}
.hidden-text {
visibility: hidden;
white-space: nowrap;
display: flex; /* 子元素水平排列 */
flex-wrap: wrap; /* 自动换行 */
justify-content: center; /* 保持内容水平居中 */
}
/* 跳跃动画,调整角度 */
@keyframes jump {
0% {
transform: translateY(0) rotate(0deg);
}
30% {
transform: translateY(-20px) rotate(-10deg);
}
100% {
transform: translateY(0) rotate(10deg);
}
}
/* 掉落动画 */
@keyframes fall {
0% {
transform: translateY(0) rotate(0deg);
opacity: 1;
}
100% {
transform: translateY(100vh) rotate(360deg);
opacity: 0;
}
}
/* 弹跳动画 */
@keyframes bounceIn {
0% {
transform: scale(1);
margin-right: 0px;
opacity: 0;
}
1% {
transform: scale(1);
margin-right: 0px;
opacity: 1;
}
60% {
transform: scale(1.7);
margin-right: 20px;
opacity: 1;
}
100% {
transform: scale(1);
margin-right: 0px;
opacity: 1;
}
}
/* 跳跃+掉落动画 */
@keyframes jumpAndFall {
0% {
transform: translateY(0) rotate(0deg);
}
30% {
transform: translateY(-20px) rotate(calc(var(--random-angle) * -1deg));
}
100% {
transform: translateY(120vh) rotate(360deg);
}
}
.visible-text span {
display: inline-block;
opacity: 1;
animation: bounceIn 0.6s ease-out forwards;
color: #5165e8;
white-space: pre;
animation-fill-mode: both;
}