Problems locating the background image on Stellar.js

I use stellar.js to add a parallax effect to a vertical scroll website, but I have problems with the background position. When I use the "data-stellar-background-ratio" class to add a parallax effect to a div, I cannot set position the background to the right using CSS. All background images just go left, no matter what. I tried using the position property plugin syntax available on the website, but it seems to somehow violate the parallax effect. Can anybody help me? Thanks!

+2
source share
4 answers

I had the same problem.

In your jquery.stellar.js file, change the star function so that horizontal scrolling is set to false (its default value is true).

$.stellar({ horizontalScrolling:false // rest of function }); 
+8
source

Try changing scrollProperty to transform , for example:

 scrollProperty: 'transform' 

It worked for me.

+4
source

I had the same problem and I already had horizontalScrolling:false . Adding scrollProperty: 'transform' resolved the issue for me.

0
source

Having the same problem, I tried adding

 scrollProperty and horizontalScrolling 

Although this led to my background not loading.

Removing both properties and starting Stellar as ..

 $.stellar({}) instead of $.stellar() 

(e.g. on Stellar website)

Parallax works like a charm.

0
source

All Articles