-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
88 lines (81 loc) · 1.4 KB
/
style.css
File metadata and controls
88 lines (81 loc) · 1.4 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
@import url('https://fonts.googleapis.com/css2?family=Inter&family=Tourney&display=swap');
* {
margin: 0;
padding: 0;
}
body {
font-family: 'Tourney', sans-serif;
background-color: #adb5bd;
overflow: hidden;
}
.game-container {
background-image: url('assets/game-bg.jpg');
background-repeat: no-repeat;
background-size: cover;
width: 100%;
height: 100vh;
}
.game-title {
position: relative;
top: 48px;
text-align: center;
font-size: 2rem;
}
.game-title p {
margin-top: 12px;
font-size: 0.5em;
font-family: sans-serif;
font-weight: bold;
}
.game-score {
position: absolute;
top: 24px;
right: 48px;
font-family: sans-serif;
font-weight: bolder;
}
.dino {
background-image: url('assets/dino.png');
background-repeat: no-repeat;
background-size: cover;
width: 100px;
height: 100px;
position: absolute;
left: 48px;
bottom: 160px;
}
.obstacle {
background-image: url('assets/obstacle.png');
background-repeat: no-repeat;
background-size: cover;
width: 100px;
height: 100px;
position: absolute;
right: 60px;
bottom: 160px;
}
.dino-animation {
animation: dino-ani 0.7s linear;
}
.obstacle-animation {
animation: obstacle-ani 2s linear infinite;
}
@keyframes dino-ani {
0% {
bottom: 160px;
}
50% {
bottom: 400px;
}
100% {
bottom: 160px;
}
}
@keyframes obstacle-ani {
0% {
left: 100vw;
}
100% {
left: -100vw;
}
}