-
Notifications
You must be signed in to change notification settings - Fork 1
/
game.css
79 lines (71 loc) · 1.27 KB
/
game.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
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-image: url('./assets/background.png');
background-size: cover;
background-position: center;
background-repeat: no-repeat;
margin: 0;
padding: 0;
}
#start-btn {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
padding: 15px 30px;
font-size: 1.5rem;
color: #fff;
background: #000000;
border: none;
border-radius: 5px;
cursor: pointer;
outline: none;
transition: all 0.3s ease;
}
#start-btn:hover {
background: #ff8a80;
}
#game-container {
position: relative;
height: 500px;
width: 900px;
background: url("./assets/background.png");
background-size: cover;
background-position: bottom;
background-position-y: -95px;
/* border: 3px solid #ffffff; */
border-bottom-width: 0px;
display: none;
}
#score {
position: fixed;
top: 10px;
right: 10px;
font-size: 30px;
color: #ffffff;
}
#mario {
position: absolute;
bottom: 32px;
left: 50px;
height: 100px;
transition: all 0.2s;
}
.obstacle {
position: absolute;
bottom: 35px;
width: 60px;
transition: all 0.3s;
display: none;
}
.flipped {
transform: scaleX(-1);
transition: all 0s;
}
#mushroom {
width: 80px;
bottom: 10px;
}