Volt 22 Posted May 28, 2022 Share Posted May 28, 2022 Hello From the codepen, I have a scrolltrigger animation where the headers scroll to both sides of a pinned image. I want the headers to scroll and have about 50% of the headers hidden, with the image in-between, and some sort of horizontal center alignment of both the image and the headers when the scroll animation is complete. And I want this to be consistent across all screen sizes. Just like it is on the site: https://defundtigraygenocide.com/ I'm trying to recreate it for practice - https://defund-tigray.webflow.io/ Please, how do I achieve this? Thank you. See the Pen NWyyqLm?editors=1000 by voltmeup (@voltmeup) on CodePen Link to comment Share on other sites More sharing options...
Solution Cassie Posted May 29, 2022 Solution Share Posted May 29, 2022 Hey there! Nice work recreating this. It's a lovely site. I think you're after functional values and invalidateOnRefresh() Let me know if this helps! 1 Link to comment Share on other sites More sharing options...
Volt 22 Posted May 29, 2022 Author Share Posted May 29, 2022 Thank you Cassie. That helped. 1 Link to comment Share on other sites More sharing options...
Cassie Posted May 29, 2022 Share Posted May 29, 2022 Glad to hear! Link to comment Share on other sites More sharing options...
Volt 22 Posted May 30, 2022 Author Share Posted May 30, 2022 Hello Cassie, How do I align all the headers with equal spacing on either sides of the image. From the sample site, notice how the last header with text content 'genocide' scrolls to align with the header 'when war' towards the end of the animation. Link to comment Share on other sites More sharing options...
Cassie Posted May 31, 2022 Share Posted May 31, 2022 Heya! There's not really a magic formula to this really. I'd just tweak the values until it's visually in the right place. Animation is 99% tweaking values until it looks/feels right - Good luck! Link to comment Share on other sites More sharing options...
Volt 22 Posted May 31, 2022 Author Share Posted May 31, 2022 Alright Cassie, Thanks again for the response, I'll keep tweaking then. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now