-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
205 lines (180 loc) · 5.62 KB
/
index.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
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
<!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">
<script src="https://cdn.tailwindcss.com"></script>
<style>
/* adjust height of containers (in ratio) to change position of gap on the screen */
/* content properties for setting bg to screen fit */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
#sky {
background-color: rgb(49, 88, 244);
position: fixed;
width: 100%;
height: 100%;
left: 0;
top: 0;
z-index: 10;
overflow: hidden;
}
.divContent {
height: 100%;
top: 0;
z-index: 10;
}
.container11 {
width: 90px;
height: 180px;
overflow: hidden;
position: relative;
}
.container12 {
width: 90px;
height: 900px;
overflow: hidden;
}
.container21 {
width: 90px;
height: 180px;
overflow: hidden;
position: relative;
}
.container22 {
width: 90px;
height: 900px;
overflow: hidden;
}
.container31 {
width: 90px;
height: 180px;
overflow: hidden;
position: relative;
}
.container32 {
width: 90px;
height: 900px;
overflow: hidden;
}
.container41 {
width: 90px;
height: 180px;
overflow: hidden;
position: relative;
}
.container42 {
width: 90px;
height: 900px;
overflow: hidden;
}
.pipe1 {
transform: rotate(180deg);
width: 100%;
position: absolute;
bottom: 0;
margin-bottom: 0px;
}
.pipe2 {
-webkit-transform: scaleX(-1);
transform: scaleX(-1);
/* flip image */
width: 100%;
top: 0;
}
.middle {
min-height: 250px;
/* 200px is minimum */
}
#content1 {
position: absolute;
left: -30%;
animation: move 6s linear 0.5s infinite;
animation-direction: reverse;
/* animation-name, duration, timing function, delay */
}
#content2 {
position: absolute;
left: -30%;
animation: move 6s linear 2s infinite;
animation-direction: reverse;
}
#content3 {
left: -30%;
position: absolute;
animation: move 6s linear 3.5s infinite;
animation-direction: reverse;
}
#content4 {
position: absolute;
left: -30%;
animation: move 6s linear 4s infinite;
animation-direction: reverse;
}
@-webkit-keyframes move {
from {
left: -30%;
}
to {
left: 100%;
}
}
#bird {
top: 40%;
left: 30%;
height: 35px;
position: absolute;
animation: birdMove 1s linear 0s infinite;
}
</style>
<title>Flappy Bird</title>
</head>
<body id="sky">
<h1 class="flex justify-center text-5xl font-bold" id="score"></h1>
<h1 class="flex justify-center text-2xl font-medium" id="refresh"></h1>
<div class="flex flex-row justify-evenly" id="background">
<div class="divContent flex flex-col justify-between" id="content1">
<div class="container11">
<img class="pipe1" src="assets/pipeGreen.png" id="img11" alt="">
</div>
<div class="middle"></div>
<div class="container12">
<img class="pipe2" src="assets/pipeGreen.png" id="img12" alt="">
</div>
</div>
<div class="divContent flex flex-col justify-between" id="content2">
<div class="container21">
<img class="pipe1" src="assets/pipeGreen.png" id="img21" alt="">
</div>
<div class="middle"></div>
<div class="container22">
<img class="pipe2" src="assets/pipeGreen.png" id="img22" alt="">
</div>
</div>
<div class="divContent flex flex-col justify-between" id="content3">
<div class="container31">
<img class="pipe1" src="assets/pipeGreen.png" id="img31" alt="">
</div>
<div class="middle"></div>
<div class="container32">
<img class="pipe2" src="assets/pipeGreen.png" id="img32" alt="">
</div>
</div>
<div class="divContent flex flex-col justify-center" id="content4">
<div class="container41">
<img class="pipe1" src="assets/pipeGreen.png" id="img11" alt="">
</div>
<div class="middle"></div>
<div class="container42">
<img class="pipe2" src="assets/pipeGreen.png" id="img12" alt="">
</div>
</div>
</div>
<img src="assets/bird.png" id="bird">
</body>
<script src="script.js"></script>
</html>