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

Request to implement delay on some elements #73

Closed
iapparatus opened this issue Sep 7, 2017 · 8 comments
Closed

Request to implement delay on some elements #73

iapparatus opened this issue Sep 7, 2017 · 8 comments

Comments

@iapparatus
Copy link

How feasible is it to implement a 'delay' method so it would be possible to keep some elements in place for specified amount of time before they get animated (follow the scroll)? Primary use is for the elements that are located "above the fold". Looking for a way to start parallax scroll with elements animated one by one.

@iapparatus
Copy link
Author

Another way yo describe what I'm thinking about is 'easing in / easing out' effect.

@p-realinho
Copy link
Contributor

Hi, thanks for using Rellax.
I usually achieve this effect with just CSS transitions.
(I can't right now, but I'll leave some examples later)

@iapparatus
Copy link
Author

@p-realinho Thanks!

@p-realinho
Copy link
Contributor

Did it work?
Sorry, I forgot to post the examples 😕

@iapparatus
Copy link
Author

I didn't try it yet. If you have an example that would be helpful.

@p-realinho
Copy link
Contributor

.rellax {
    transition: transform .6s;
}

This is probably the bare minimum.
You can (and should) of course play with the durations and easings.

.rellax {
    transition: transform 30s cubic-bezier(0, 1.5, 0, 1);
}

I find this duration/easing combo particularly useful, because although the element follows the scroll immediately, it slowly keeps translating after the scroll stops, giving it a sort of really long ease-out effect.

Hope it helps!

@iapparatus
Copy link
Author

Thanks, I played with various options and see what you mean now. It is an interesting effect that seems to work best for the "ease out". My goal is a bit different. I want to hold elements in position while the scroll is happening. Let's say you start scrolling and you want one of the elements to stay in original position for a second longer.

@moeamaya
Copy link
Member

moeamaya commented Nov 2, 2017

Hey @iapparatus, appreciate the issue, but I think this is well beyond the scope of the Rellax library.

I'm actually pretty into your idea, but I think it's worth writing something custom to make this work.

@moeamaya moeamaya closed this as completed Nov 2, 2017
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

3 participants