Jump to content
Search Community

its possible make vertical & horizontal scrolling in container with pinned section + pinSpacing: false ?

Ivan Mocs test
Moderator Tag

Go to solution Solved by Rodrigo,

Recommended Posts

this is my update code

codepen.io/adeivan/pen/JjzBZKy

I've tried it, and it works, but how do I get the scrolling on each section to finish before the other section enters?

I used pinSpacing: false to get the section stack effect

Link to comment
Share on other sites

8 hours ago, Ivan Mocs said:

Is it possible to scroll through text in a pinned container?

this is my update code

 

codepen.io/adeivan/pen/JjzBZKy

 

I've tried it, and it works, but how do I get the scrolling on each section to finish before the other section enters?

I used pinSpacing: false to get the section stack effect

Link to comment
Share on other sites

  • Solution

Hi,

 

Maybe something like this:

See the Pen yLwxpjZ by GreenSock (@GreenSock) on CodePen

 

Just use two different ScrollTriggers, one for pinning and another for the animation and just do some math in order to finish the animation once the next section appears at the bottom of the screen. This whole setup depends that each section has to be 100vh, getting around that requires more logic and time I'm afraid.

 

Hopefully this helps.

Happy Tweening!

  • Thanks 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...