-
Notifications
You must be signed in to change notification settings - Fork 0
/
Platformer.css
75 lines (64 loc) · 1.29 KB
/
Platformer.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
body {
display: flex;
justify-content: center;
align-items: center;
margin: 0;
height: 100vh;
}
.scene {
overflow: hidden;
width: 1000px;
height: 560px;
}
.game {
position: relative;
width: 400%;
height: 100%;
}
.background {
position: absolute;
top: 0;
width: 100%;
height: 100%;
}
.background__layer {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
transition: linear .15s;
}
.background__layer[data-index="0"] {
background: url(background/layer-0.png) center repeat-x;
background-size: auto 100%;
}
.background__layer[data-index="1"] {
background: url(background/layer-1.png) center repeat-x;
background-size: auto 100%;
}
.background__layer[data-index="2"] {
background: url(background/layer-2.png) center repeat-x;
background-size: auto 100%;
}
.background__layer[data-index="3"] {
background: url(background/layer-3.png) center repeat-x;
background-size: auto 100%;
}
.background__layer[data-index="4"] {
background: url(background/layer-4.png) center repeat-x;
background-size: auto 100%;
}
.background__layer[data-index="5"] {
background: url(background/layer-5.png) center repeat-x;
background-size: auto 100%;
z-index: 10;
}
#character {
position: absolute;
z-index: 2;
bottom: 28px;
width: 100px;
height: 74px;
transition: bottom linear .15s;
}