pixelcog / parallax.js

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

Container background hides image #220

Closed zx-sd closed 6 years ago

zx-sd commented 7 years ago

The documentation mentioned it:

Due to the nature of this implementation, you must ensure that these parallax objects and any layers below them are transparent so that you can see the parallax effect underneath.

So, if I set a container background, the parallax div hides the image:

<section style="background:white;">
  <div class="parallax-window" data-parallax="scroll" data-speed="0.5" data-image-src="img.jpg"></div>
</section>

However, is there any way to avoid it?

wstoettinger commented 6 years ago

hello @ZoiX ! you could try the mirrorContainer option in v1.5 (which has been renamed to mirrorSelector in v2 alpha)

good luck!