Jump to content
Search Community

The question about the height of the section during the pinned container animation.

mikhael

Recommended Posts

Posted

I’m trying to set up an animation for a pinned container. Everything seems to work, but I can’t figure out why I need to set the section height to 100vh more than the height of all the scrollable elements combined.

Am I doing something wrong? 

See the Pen LEPyrjO by mikhail21990 (@mikhail21990) on CodePen.

Posted

I added a second pin for the same element, and for this one, it’s no longer necessary to increase the height of the wrapper block.

Снимок экрана 2024-12-22 012633.jpg

Posted

Hi,

 

Indeed this can be solved either by pinning all the visible elements to prevent that space or wrap those elements with another one and pin that parent element as shown in these demos

See the Pen qBLRzVX by GreenSock (@GreenSock) on CodePen.

 

See the Pen ZEVpqjb by GreenSock (@GreenSock) on CodePen.

 

This is not a GSAP problem, just a need for the HTML layout that stems from the way pinning works, just that.

 

Hopefully this helps

Happy Tweening!

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...