Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update scroll speed but keep current position offset at breakpoint #256

Open
AleksandrAlbert opened this issue Jan 24, 2025 · 1 comment

Comments

@AleksandrAlbert
Copy link

I am trying to achieve an effect where I need the parallax effect to pause once a breakpoint is reached. Effectively, I would like to set the speed to 0 when the breakpoint is hit but have the elements retain their current positions rather than moving to where their positions would have been if the speed was always 0. Is this possible?

@AleksandrAlbert
Copy link
Author

For future travelers, I was able to solve this by making use of the data-rellax-min and data-rellax-max properties, which allow you to specify a maximum range within which the element will move from its starting position

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant