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

How to make rellax positions "predictable"? #241

Open
gremo opened this issue Mar 1, 2022 · 1 comment
Open

How to make rellax positions "predictable"? #241

gremo opened this issue Mar 1, 2022 · 1 comment

Comments

@gremo
Copy link

gremo commented Mar 1, 2022

When relax items are on the very top of the page their position is predictable (https://codepen.io/iosystems/pen/VwrVeOV): the three boxes start in the middle of the container.

Example 1

On the contrary, when there is content above the container, rellax items positions is unpredictable (https://codepen.io/iosystems/pen/rNYQeQZ): box 1 and 3 are already outside their container.

Question is: is there any way to say "start in the original position, despite the fact that there is content above it"?

pen2

@p-realinho
Copy link
Contributor

Hi!
Have you tried the centering option?
You can make all the elements meet their original position when they're crossing the middle of the viewport, or, define a percentage relative to the viewport's height that is where they should meet the original position.
Let me know if that helps.

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

2 participants