-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyles.css
More file actions
101 lines (90 loc) · 2.02 KB
/
Copy pathstyles.css
File metadata and controls
101 lines (90 loc) · 2.02 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
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background: linear-gradient(to bottom, #87ceeb, #1e90ff); /* Sky background */
}
#gameContainer {
position: relative;
width: 100vw;
height: 100vh;
overflow: hidden;
}
#plane {
position: absolute;
width: 100px;
height: 100px;
background-image: url('plane.png'); /* Use your plane image */
background-size: cover;
top: 50%;
left: 20%;
z-index: 2; /* Keep it on top */
}
#score {
position: absolute;
top: 10px;
left: 10px;
font-size: 24px;
color: #fff;
font-family: Arial, sans-serif;
}
.obstacle {
position: absolute;
width: 80px;
background-image: url('tower.png'); /* Use your building image */
background-size:cover;
animation: moveBuilding 4s linear infinite;
z-index: 1; /* Keep behind the plane */
}
#gameContainer {
position: relative;
width: 100%;
height: 100vh;
background-image: url('bg.jpg'); /* Use your custom background */
background-size: cover;
/* background-repeat: repeat-x; Repeat horizontally */
background-position: 0 0;
overflow: hidden;
animation: scrollBackground 10s linear infinite; /* Infinite scroll */
}
@keyframes scrollBackground {
0% {
background-position: 0 0;
}
100% {
background-position: -100% 0; /* Moves background horizontally */
}
}
#comboText {
position: absolute;
top: 20px;
left: 50%;
transform: translateX(-50%);
font-size: 24px;
color: yellow;
font-family: sans-serif;
display: none; /* Hidden initially */
animation: fadeCombo 1s forwards;
}
@keyframes fadeCombo {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
@keyframes moveBuilding {
from {
right: -80px;
}
to {
right: 100vw;
}
}