I make a layout with Materialize CSS. I do not like the built-in parallax , I decided to do the custom (working version, I implemented it more than once).
I can’t understand, I’m implementing it here, a band appears (the background is duplicated), disappears, if you remove fixed , but parallax itself does not work like this:
function Parallax() { var scrolled = $(window).scrollTop() + 1; $('.stat-slid-prlx').css('background-position', '15' + -(scrolled * 0.3) + 'px'); } $(window).scroll(function (e) { Parallax(); }); <div class="stat-slid-prlx " style="background: url(http://www.cok-rf.ru/img/first_level/4_p.jpg) fixed;" ></div>