-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
110 lines (97 loc) · 3.01 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
body{
background-image: url("assets/land.png");
}
.player{
width: 80px;
height: 100px;
background-image: url("assets/player_front.png");
background-size: 240px 100px;
background-position: -80px 0;
position: fixed;
z-index: 999;
}
.player.active{
animation: .2s walk linear infinite;
}
@keyframes walk{
0%, 32%{
background-position: 0 0;
}
33%, 65%{
background-position: -80px 0;
}
66%, 100%{
background-position: -160px 0;
}
}
.bush{
width: 50px;
height: 40px;
background-image: url("assets/bush.png");
background-size: 100% 100%;
position: fixed;
z-index: -1;
}
.pokeball{
width: 30px;
height: 30px;
background-image: url("assets/pokeball.png");
background-size: 100% 100%;
position: fixed;
}
.score {
position: fixed; /* Keeps the score in a fixed position on the screen */
top: 20px; /* Distance from the top of the viewport */
left: 20px; /* Distance from the left of the viewport */
font-size: 24px; /* Font size for the score */
color: white; /* Text color */
background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background for better visibility */
padding: 10px; /* Padding around the text */
border-radius: 5px; /* Rounded corners */
z-index: 1000; /* Ensure it appears above other elements */
}
#timer {
position: fixed; /* Keeps the timer in a fixed position on the screen */
top: 20px; /* Distance from the top of the viewport */
right: 20px; /* Distance from the right of the viewport */
font-size: 24px; /* Font size for the timer */
color: white; /* Text color */
background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background for better visibility */
padding: 10px; /* Padding around the text */
border-radius: 5px; /* Rounded corners */
z-index: 1000; /* Ensure it appears above other elements */
}
.level {
position: fixed; /* Keeps the level display in a fixed position on the screen */
top: 60px; /* Distance from the top of the viewport */
left: 20px; /* Distance from the left of the viewport */
font-size: 24px; /* Font size for the level */
color: white; /* Text color */
background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background for better visibility */
padding: 10px; /* Padding around the text */
border-radius: 5px; /* Rounded corners */
z-index: 1000; /* Ensure it appears above other elements */
}
.alert-box {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: #f0f0f0;
border: 1px solid #ddd;
padding: 20px;
width: 300px;
text-align: center;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}
#play-again-btn{
background-color: #4CAF50;
color: #fff;
padding: 10px 20px;
border: none;
border-radius: 5px;
cursor: pointer;
}
#play-again-btn:hover {
background-color: #3e8e41;
}