Created
November 13, 2011 22:15
-
-
Save bobmaerten/1362818 to your computer and use it in GitHub Desktop.
Un peu d'animation
This file contains 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
.affiche { | |
position: relative; | |
height: 260px; | |
overflow:hidden; | |
padding: 0; | |
} | |
.affiche img { | |
margin: 0; | |
padding: 0; | |
position: relative; | |
} |
This file contains 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 class="affiche"> | |
<img id="pic" src="http://placehold.it/940x560" /> | |
<div class="container"> | |
<h1>Mon Super Site</h1> | |
<p>ou on y cause de tout et de rien...</p> | |
</div> | |
</div> |
This file contains 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
$(document).ready(function() { | |
function up() { | |
$("#plop").animate({"top": "-=200px"}, 1000, "linear", down); | |
} | |
function down() { | |
$("#plop").animate({"top": "+=200px"},1000, "linear", up); | |
} | |
up(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment