Skip to content

Commit b39d576

Browse files
committed
Added all files to the repository
1 parent d09407c commit b39d576

13 files changed

+118
-0
lines changed

img/39058.png

205 KB
Loading

img/Background.jpg

178 KB
Loading

img/Block.gif

6.97 KB
Loading

img/VW2DYbL.png

452 KB
Loading
Loading

img/mario-jump.png

1.78 KB
Loading

img/mario.png

5.63 KB
Loading

img/mushroom.png

1.33 KB
Loading

img/runningcat.png

156 KB
Loading

img/scottpilgrim_multiple.png

7.86 KB
Loading

img/stars.gif

16 KB
Loading

index.html

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<title>CSS Animation</title>
6+
<link rel="stylesheet" href="styles.css">
7+
</head>
8+
<body>
9+
<div id="stars">
10+
<h1>ALWAYS MOVE FORWARD!</h1>
11+
</div>
12+
<div id="container">
13+
<div id="background"></div>
14+
</div>
15+
<div id="spriteHolder">
16+
<img id="sprite" alt="sprite" src="img/scottpilgrim_multiple.png" width="850px" height="225px">
17+
</div>
18+
</body>
19+
</html>

styles.css

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
#stars {
2+
position:absolute;
3+
top: 30px;
4+
background-image: url(img/stars.gif);
5+
width: 1300px;
6+
height: 530px;
7+
z-index: 1;
8+
animation: reveal linear 10s infinite;
9+
opacity: 0;
10+
}
11+
12+
@keyframes reveal {
13+
0%{
14+
color:transparent;
15+
opacity: 0;
16+
}
17+
25% {
18+
color:transparent;
19+
opacity: 0.25;
20+
}
21+
50% {
22+
text-align: center;
23+
color: white;
24+
font-size: 30px;
25+
opacity: 1;
26+
}
27+
75% {
28+
text-align: center;
29+
font-size: 30px;
30+
opacity: 0.25;
31+
}
32+
100%{
33+
text-align: center;
34+
font-size: 30px;
35+
opacity: 0;
36+
}
37+
}
38+
39+
#container {
40+
width:1300px;
41+
height:700px;
42+
overflow:hidden;
43+
z-index: 0;
44+
}
45+
46+
#background {
47+
position:relative;
48+
background: url(img/Background.jpg);
49+
background-repeat: repeat-x;
50+
background-size: contain;
51+
width: 2800px;
52+
height: 700px;
53+
animation: background-move linear 10s infinite;
54+
}
55+
56+
@keyframes background-move {
57+
0%{
58+
right: 0px;
59+
filter: brightness(1.25);
60+
}
61+
25% {
62+
filter:brightness(0.5);
63+
}
64+
50% {
65+
filter:brightness(0);
66+
}
67+
75% {
68+
filter:brightness(0);
69+
}
70+
100%{
71+
right: 1230px; filter:brightness(1.25);
72+
}
73+
}
74+
75+
#spriteHolder {
76+
position: absolute;
77+
top: 385px;
78+
left: 400px;
79+
width: 108px;
80+
height: 225px;
81+
overflow:hidden;
82+
z-index: 2;
83+
}
84+
85+
#sprite {
86+
animation: sprite-run 1s steps(8) infinite;
87+
}
88+
89+
@keyframes sprite-run {
90+
0% {
91+
position:relative;
92+
left: 0px;
93+
}
94+
95+
100% {
96+
position:relative;
97+
left: -850px;
98+
}
99+
}

0 commit comments

Comments
 (0)