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

Flash on image load #296

Open GabrielLanglois opened 4 years ago

GabrielLanglois commented 4 years ago

Hello, I made this website using pixelcog parallax.js: http://www.sfdecacao.com/ (it's in French but only the images are important here)

As you can probably see, each background image using the parralax effect takes a little bit of time to load, so there is a flash before it appears. At first the flash was white, but I made the background color of the website black so that it would be more natural looking. However, I am still looking for a way to fix this flash. The problem is that the images only load when they appear on screen, and not when the website loads, so the user sees each flash.

The source code for my website is here: https://github.com/GL150hcknt/SFC

I do not know exactly if this is caused by parallax.js or not, but it would be a great help if someone knew how to fiw this.