pixelcog / parallax.js

Simple parallax scrolling effect inspired by Spotify.com implemented as a jQuery plugin
MIT License
3.53k stars 840 forks source link

Using a semi-transparent container over background image lag #290

Open pjr94 opened 4 years ago

pjr94 commented 4 years ago

Hi there. I have a background parallax image filling 100vh, and I want the bottom half the screen to be covered in a tansparent container (rgba(x,x,x,0.8)) for a background for some text. Both of these divs end at the same point another parallax bg image follows it. This looks fine until I scroll, which sometimes reveals a strip of the (first) background image between the two sections for a split section. The bottom of the "content" div doesn't stay aligned with the first "parallax-window" div and lags behind it somewhat. I've included an example of the code, hope that makes sense. Thanks.

<div class="parallax-window" height="100vh" .... >
    <div class="content" height="50vh" bottom="0" ....>
        .....content....
    </div>
</div>
<div class="parallax-window" ...>
    .....
</div>
JustFowl commented 4 years ago

Me too, I've been trying all day to fix this. Anyone else get it to work?