css - Slider's background changes while scrolling the page,How Could it be possible -


please take @ website :

http://psnprofiles.com/

how slider's background work? think it's div how place behind else , scroll down see effect on slider's background picture how can make slider's background that,to change while scrolling page down.

what want jquery scroll script. in page, see down bottom

if ($('#slider'))             {                 $(window).scroll(function(e)                 {                     var scrolltop = $(this).scrolltop();                     if (scrolltop <= 520)                     {                         if (scrolltop < 60)                         {                             scrolltop = 60;                         }                         $('#slider').css('-webkit-transform', 'translate3d(0,'+math.floor((scrolltop-60)/2)+'px, 0)').css('-moz-transform', 'translate3d(0,'+math.floor((scrolltop-60)/2)+'px, 0)');                     }                 });             } 

this causes behavior. can use scripts stellar , skrollr , many more. it's called parallax scrolling


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -