-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgame.scss
85 lines (77 loc) · 1.41 KB
/
game.scss
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
@import 'normalize';
@font-face {
font-family: flappyBirdy;
src: url('./assets/FlappyBirdy.ttf');
}
body {
font-family: flappyBirdy;
font-size: 3rem;
color: #fc7858;
text-transform: uppercase;
touch-action: manipulation;
margin: 0;
line-height: 100%;
padding: 0;
}
.wrapper {
position: fixed;
top: 0;
bottom: 0;
user-select: none;
display: flex;
justify-content: center;
align-items: center;
height: 100%;
background: #20222c;
width: 100%;
@media screen and (min-width: 600px) {
position: relative;
min-height: 100vh;
}
}
.game {
position: relative;
height: 100%;
display: flex;
flex-direction: column;
width: 100%;
border-radius: 0.3rem;
box-shadow: 0px 0px 50px rgba(0, 0, 0, 0.7);
overflow: hidden;
@media screen and (min-width: 600px) {
height: 612px;
width: 388px;
}
}
.container {
flex-grow: 1;
background: url('./assets/background-day.png');
background-size: cover;
position: relative;
display: flex;
overflow: hidden;
width: 100%;
@media screen and (min-width: 600px) {
flex-grow: 0;
height: 100%;
}
}
.base {
height: 112px;
flex-shrink: 0;
width: 100%;
will-change: background-position;
background: url('./assets/base.png');
animation: base 1.8s infinite linear;
z-index: 2;
}
@keyframes play {
100% {
background-position: -150px;
}
}
@keyframes base {
100% {
background-position: -336px;
}
}