Repository navigation
Expand file tree
/
Copy pathmario.css
More file actions
128 lines (121 loc) · 2.17 KB
/
Copy pathmario.css
File metadata and controls
128 lines (121 loc) · 2.17 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
/*// BASE STYLES //*/
html, body{
height: 100%;
width: 100%;
overflow: hidden;
margin: 0;
}
.grass, .sky, .road{
position: relative;
}
.sky{
height: 40%;
background-color: skyblue;
background-image: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,.33))
}
.grass{
height: 30%;
background-color: seagreen;
background-image: linear-gradient(to top, rgba(255,255,255,0) 75%, rgba(255,255,255,.25))
}
.road{
height: 30%;
background: dimgrey;
box-sizing: border-box;
border-top: 10px solid grey;
border-bottom: 10px solid grey;
width: 100%;
}
/*// ELEMENTS TO ANIMATE //*/
.mario{
position: absolute;
top: -50px;
left: 0;
animation-name:mario-jump ;
animation-duration: 9.5s;
animation-direction: normal;
animation-timing-function: ease-in-out;
animation-iteration-count: infinite;
z-index: 5;
}
.luigi{
position: absolute;
top: -20px;
left: -50px;
z-index: 55;
animation-name: drive ;
animation-duration: 10s;
animation-direction: normal;
animation-timing-function: linear ;
animation-iteration-count: infinite ;
}
.cloud{
position: absolute;
top: 120px;
left: 0;
}
.cloud2{
position: absolute;
top: 20px;
right: 0;
max-width: 200px;
}
.cloud,
.cloud2{
animation-name:cloud-move ;
animation-duration:16s;
animation-direction: reverse;
animation-timing-function: linear;
animation-iteration-count: infinite ;
}
.lines{
box-sizing: border-box;
border: 5px dashed #fff;
height: 0px;
width: 6000px;
position: absolute;
top: 45%;
left: 0;
animation-name: lines-move;
animation-duration: 10s;
animation-direction: normal;
animation-timing-function: linear ;
animation-iteration-count: infinite ;
}
/*// KEYFRAMES //*/
@keyframes drive {
0%{
transform:translateX(-100%);
}
100%{
transform:translateX(1620%);
}
}
@keyframes mario-jump {
0%{
transform:translateX(-100%);
}
48% {
top: -50px;
}
50% {
top : -100px;
}
52% {
top: -50px;
}
100%{
transform:translateX(1620%);
}
}
@keyframes cloud-move {
from {
transform: translateX(-940%);
}
to {
transform:translateX(910%)
}
}
@keyframes lines-move {
to{left: -100%;}
}