-
Notifications
You must be signed in to change notification settings - Fork 1
/
styles.css
153 lines (135 loc) · 2.76 KB
/
styles.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
153
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
overflow: hidden;
}
section {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background: #034071;
}
section .runway {
position: relative;
width: 400px;
height: 100vh;
background: #222222;
border-left: 20px solid rgba(0, 0, 0, 0.25);
border-right: 20px solid rgba(0, 0, 0, 0.25);
transition: transform 1s;
transition-delay: 1s;
transform-origin: top;
}
section:active .runway {
transform: scaleX(0.7) scaleY(0);
transition-delay: 0s;
transform-origin: bottom;
}
section .runway::before {
content: '';
position: absolute;
top: 0;
left: 50%;
transform: translate(-50%);
width: 15px;
height: 100%;
background: repeating-linear-gradient(transparent 0%, transparent 50%, #fff 50%, #fff 100%);
background-size: 20px 320px;
animation: animateRunway 0.5s linear infinite;
}
section:active .runway::before {
animation: animateRunway 0.25s linear infinite;
}
@keyframes animateRunway {
0% {
background-position-y: 0px;
}
100% {
background-position-y: 640px;
}
}
.plane {
position: absolute;
bottom: 100px;
max-width: 250px;
pointer-events: none;
filter: drop-shadow(10px 10px 0 rgba(0, 0, 0, 0.5));
transition: 5s;
}
section:active .plane {
max-width: 500px;
filter: drop-shadow(200px 200px 0 rgba(0, 0, 0, 0));
}
.clouds {
position: absolute;
left: 0;
width: 100%;
height: 100%;
z-index: 10000;
pointer-events: none;
opacity: 0;
transition: opacity 2s;
transition-delay: 0s;
}
section:active .clouds {
opacity: 1;
transition-delay: 1s;
}
.clouds img {
position: absolute;
left: 0;
width: 800px;
animation: animateClouds 4s linear infinite;
animation-delay: calc(-1.5s * var(--i));
}
.clouds2 {
right: 0;
transform: rotate(180deg);
}
.clouds2 img {
animation: animateClouds2 4s linear infinite;
animation-delay: calc(-1.5s * var(--i));
}
@keyframes animateClouds {
0% {
transform: translateY(-100%);
}
100% {
transform: translateY(100%);
}
}
@keyframes animateClouds2 {
0% {
transform: translateY(100%);
}
100% {
transform: translateY(-100%);
}
}
#instructions {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: rgba(0, 0, 0, 0.7);
color: white;
padding: 20px;
text-align: center;
}
.hidden {
display: none;
}
#restartButton {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: rgba(0, 0, 0, 0.7);
color: white;
padding: 20px;
text-align: center;
}