-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
109 lines (90 loc) · 1.82 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
/*
* A simple balloon popup game
* 2023 - Jeevanism.com
*/
:root {
--balloon-width: 200px;
--balloon-height: 284px;
--explode-balloon-image: url('explode.gif');
--explode-balloon-image-mobile: url('explode-mobile.gif');
}
body{
height: 100vh;
background-color: #c8ae5b;
}
#gameContainer {
cursor: url('gun-small.png'), auto;
position: relative;
width: 100%;
height: 90vh;
overflow: hidden;
margin-top: 2rem;
}
#gamescore {
display: block;
padding:10px;
background-color:#171717;
}
#startButton,
#stopButton {
display: block;
margin: 0 auto;
padding: 10px;
}
#speedUpButton {
display: block;
padding: 30px;
margin: 20px;
}
@keyframes balloonUp {
0% {
transform: translateY(0);
}
100% {
transform: translateY(-100vh);
}
}
@keyframes balloonExplode {
0% {
transform: scale(1);
opacity: 1;
}
100% {
transform: scale(2);
opacity: 0;
}
}
.balloon.explode {
animation: balloonExplode 0.5s forwards;
}
.balloon {
width: var(--balloon-width);
height: var(--balloon-height);
background-color: transparent;
position: absolute;
bottom: 0;
animation: balloonUp 10s linear forwards;
background-image: url("balloon.png");
object-fit: cover;
border-radius: 50%;
}
.explode-balloon {
width: var(--balloon-width);
height: var(--balloon-height);
background-image: var(--explode-balloon-image);
background-size: cover;
position: absolute;
bottom: 0;
border-radius: 50%;
animation: balloonExplode 0.5s forwards;
}
@media screen and (max-width: 480px) {
.balloon {
width: 75px;
height: 107px;
background-image: url("balloon-mobile.png");
}
.explode-balloon {
background-image: var(--explode-balloon-image-mobile);
}
}