-
-
Notifications
You must be signed in to change notification settings - Fork 524
/
style.css
153 lines (133 loc) · 2.38 KB
/
style.css
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
* {
box-sizing: border-box;
}
body {
background-color: #fef9f2;
display: flex;
align-items: center;
justify-content: space-around;
height: 100vh;
overflow: hidden;
margin: 0;
}
/* spinner */
.spinner {
width: 100px;
height: 100px;
position: relative;
}
.spinner div {
position: absolute;
width: 100%;
height: 100%;
border: 10px solid transparent;
border-top-color: #ad60f5;
border-radius: 50%;
animation: spinnerOne 1.2s linear infinite;
}
.spinner div:nth-child(2) {
border: 10px solid transparent;
border-bottom-color: #ad60f5;
animation: spinnerTwo 1.2s linear infinite;
}
@keyframes spinnerOne {
0% {
transform: rotate(0deg);
border-width: 10px;
}
50% {
transform: rotate(180deg);
border-width: 1px;
}
100% {
transform: rotate(360deg);
border-width: 10px;
}
}
@keyframes spinnerTwo {
0% {
transform: rotate(0deg);
border-width: 1px;
}
50% {
transform: rotate(180deg);
border-width: 10px;
}
100% {
transform: rotate(360deg);
border-width: 1px;
}
}
/* bouncing balls */
.bouncer {
display: flex;
justify-content: space-around;
align-items: flex-end;
width: 100px;
height: 100px;
}
.bouncer div {
width: 20px;
height: 20px;
background-color: #0077ff;
border-radius: 50%;
animation: bouncer 0.5s cubic-bezier(0.19, 0.57, 0.3, 0.98) infinite alternate;
/* use https://cubic-bezier.com/ to customize the curve */
}
.bouncer div:nth-child(2) {
animation-delay: 0.1s;
opacity: 0.8;
}
.bouncer div:nth-child(3) {
animation-delay: 0.2s;
opacity: 0.6;
}
.bouncer div:nth-child(4) {
animation-delay: 0.3s;
opacity: 0.4;
}
@keyframes bouncer {
from {
transform: translateY(0);
}
to {
transform: translateY(-100px);
}
}
/* flipping squares */
.square {
width: 100px;
height: 100px;
position: relative;
perspective: 200px;
}
.square div {
position: absolute;
top: 0;
height: 50px;
width: 50px;
background: coral;
animation: flip 2s linear infinite;
transform-origin: right bottom;
}
.square div:nth-child(2) {
animation-delay: 1s;
opacity: 0.5;
}
@keyframes flip {
0% {
transform: rotateX(0) rotateY(0);
}
25% {
transform: rotateX(0) rotateY(180deg);
}
50% {
transform: rotateX(180deg) rotateY(180deg);
}
75% {
transform: rotateX(180deg) rotateY(0);
}
100% {
transform: rotateX(0) rotateY(0);
}
}