rexarvind Posted May 19, 2022 Share Posted May 19, 2022 when horizontal scroll sections start then those sections take entire viewport height. I was trying to show some non-scrolling static title for horizontal sections during entire scroll. See the Pen BaYowgR?editors=0010 by rexarvind (@rexarvind) on CodePen Link to comment Share on other sites More sharing options...
Cassie Posted May 19, 2022 Share Posted May 19, 2022 Hi there - not sure what the question is. Can you elaborate? Link to comment Share on other sites More sharing options...
mvaneijgen Posted May 19, 2022 Share Posted May 19, 2022 Is this what you mean? I've created a timeline of your scrollTrigger so that it is easier to animate multiple elements. I've created a `.fixed` element that animates at the same time as your other elements, but moves in the opposite direction. Don't know if it is the best way of doing it, but it works. See the Pen eYVWjOo?editors=1100 by mvaneijgen (@mvaneijgen) on CodePen 1 Link to comment Share on other sites More sharing options...
rexarvind Posted May 20, 2022 Author Share Posted May 20, 2022 I want to keep the white section with title "Some Title" in viewport (like position sticky) while the entire timeline scrolls. Currently when horizontal scroll starts, it takes entire screen. Link to comment Share on other sites More sharing options...
GreenSock Posted May 20, 2022 Share Posted May 20, 2022 Like this? See the Pen rNJwOXx?editors=1010 by GreenSock (@GreenSock) on CodePen Link to comment Share on other sites More sharing options...
rexarvind Posted May 20, 2022 Author Share Posted May 20, 2022 11 minutes ago, GreenSock said: Like this? this is very close, but it ignores the content above the. the content above should be in normal flow, like the paragraph added above the "Some Title" should not stick and be normal flow. Link to comment Share on other sites More sharing options...
GreenSock Posted May 20, 2022 Share Posted May 20, 2022 Then you can simply adjust the "start" value to something like "top top". If you're still struggling, please fork my demo, make your adjustments, and post back with your minimal demo showing the problem. 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