Guybrush ThreepWood (Monkey Island) with CSS animations, using CSS3 steps() and audio HTML5.
Created
April 6, 2021 20:31
-
-
Save honsa/6408582cf9317d9fdb4ab72ea09892bc to your computer and use it in GitHub Desktop.
Monkey Island CSS Animation (without JS)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="sky"> | |
<div id="sea"> | |
<div id="gb"></div> | |
</div> | |
</div> | |
<audio id="song" autoplay> | |
<source src="http://scummbar.com/mi2/MI1-CD/26%20-%20Monkey%20Island%20-%20Rock%20Remix%202.mp3"> | |
</audio> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
margin:0; | |
background:#000; | |
} | |
#sky { | |
background:url(https://cdn.rawgit.com/ManzDev/cursos-assets/gh-pages/css3/monkey-sky.png) repeat-X; | |
animation: movebg 9s linear infinite; | |
} | |
#sea { | |
background:url(https://cdn.rawgit.com/ManzDev/cursos-assets/gh-pages/css3/monkey-sea.png) repeat-x; | |
box-shadow:10px 10px 45px RGBA(0,0,0, 0.95) inset; | |
animation: movebg 7s linear infinite; | |
position:relative; | |
top:145px; | |
} | |
@keyframes movebg { | |
0% { background-position:550px } | |
100% { background-position:0 } | |
} | |
#gb { | |
width:104px; | |
height:150px; | |
background:url(https://cdn.rawgit.com/ManzDev/cursos-assets/gh-pages/css3/monkey-guybrush.png) no-repeat; | |
animation:gbwalk 1s steps(6) infinite; | |
margin:auto; | |
position:relative; | |
bottom:34px; | |
/* Ojo, muy costoso en rendimiento */ | |
/* filter:drop-shadow(5px 5px 5px #000); */ | |
} | |
@keyframes gbwalk { | |
0% { background-position:0 } | |
100% { background-position:-624px } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment