DEV Community

Discussion on: Making a Parallax SVG Landscape - new site part 1

Collapse
 
amankanojiya profile image
AMANKANOJIYA

sir,if we can use { translateY(calc(var(--scrollPos, 0) * var(--offset, 0))) }this in all type of parallax .if I want to speed up the scrolling parallax then what to do if add some number to it or any thing else to do?? pls help me to this prolem

Collapse
 
accudio profile image
Alistair Shepherd

The speed of the parallax is controlled by the --offset custom property.
If set to 1 it will look like it is fixed, if set to 0 it will scroll with the content of the page as normal.
Go ahead and vary it and see how it changes! Although I don't need to, any number > 1 will scroll faster than the page content, and any number < 0 will scroll in a direction opposite from the scrolling direction.

Collapse
 
amankanojiya profile image
AMANKANOJIYA

Thank you Sir for explaining me this