css - Slider's background changes while scrolling the page,How Could it be possible -
please take @ website :
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
Post a Comment