-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
121 lines (111 loc) · 3.16 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Flappy Bird Deluxe</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background: linear-gradient(to bottom, #1a1a1a, #4a4a4a);
font-family: 'Arial', sans-serif;
}
.game-container {
position: relative;
width: 320px;
height: 480px;
}
canvas {
border-radius: 10px;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
background-color: #87CEEB;
}
.ui-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
}
.score-container {
position: absolute;
top: 20px;
right: 20px;
background: rgba(0, 0, 0, 0.7);
padding: 10px 20px;
border-radius: 20px;
color: white;
font-size: 24px;
pointer-events: none;
}
.start-screen {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.8);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
color: white;
pointer-events: auto;
}
.start-screen h1 {
font-size: 32px;
margin-bottom: 20px;
color: #FFD700;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}
.start-button {
padding: 15px 30px;
font-size: 20px;
background: #4CAF50;
border: none;
border-radius: 25px;
color: white;
cursor: pointer;
transition: transform 0.2s, background 0.2s;
}
.start-button:hover {
transform: scale(1.1);
background: #45a049;
}
.high-score {
position: absolute;
top: 20px;
left: 20px;
background: rgba(0, 0, 0, 0.7);
padding: 10px 20px;
border-radius: 20px;
color: white;
font-size: 16px;
pointer-events: none;
}
</style>
</head>
<body>
<div class="game-container">
<canvas id="gameCanvas" width="320" height="480"></canvas>
<div class="ui-overlay">
<div class="score-container">Score: <span id="score">0</span></div>
<div class="high-score">Best: <span id="highScore">0</span></div>
</div>
<div id="startScreen" class="start-screen">
<h1>Flappy Bird Deluxe</h1>
<button class="start-button" id="startButton">Play Game</button>
</div>
</div>
<script src="game.js"></script>
</body>
</html>