I want to implement this html effect as follows:

from this website
Image shows top to bottom with scrolling, pretty cool.
but my tool:

http://codepen.io/devbian/pen/dXOvGj
<div class="container container0"> <img src='http://special.porsche.com/microsite/mission-e/assets/images/content/reveal/intro/intro-01.jpg' class='fixed'/> </div> <div class="container container1"> <img src="http://special.porsche.com/microsite/mission-e/assets/images/content/reveal/intro/intro-02.jpg" class="moveable"> </div> <div class="container container2"> <img src="http://special.porsche.com/microsite/mission-e/assets/images/content/reveal/intro/intro-04.png" class="moveable"> </div> <div class="container container3"> <img src="http://special.porsche.com/microsite/mission-e/assets/images/content/reveal/intro/intro-05.jpg" class="moveable"> </div> * { padding: 0; margin: 0; } body{ min-height:2000px; } .container { overflow: hidden; padding: 10px; position: relative; min-height: 300px; } .container img{ width:100%; height:300px; } .fixed { position:fixed; } .moveable { position:absolute; } $(function() { function setLogo() { $('.moveable').each(function() { $(this).css('top', $('.fixed').offset().top - $(this).closest('.container').offset().top ); }); } $(window).on('scroll', function() { setLogo(); }); setLogo(); })
it is from the bottom up.
How can I change the image from top to bottom by scrolling?
javascript jquery html css jquery-animate
phnix
source share