Jump to content
Search Community

ScrollTrigger - Pin sections issue

Jeniczech test
Moderator Tag

Recommended Posts

Hello Guys,

I am trying to do a very simple pinning with three sections all having the height of 100vh. All three sections pins correctly, but the last one for some reason extends the height of 100vh and completely covers the footer that immediately follows - please see the attached CodePen. I am sorry if this has been already addressed in this forum, but I could not find any help. Thanks.

See the Pen xxEoaaM by jeniczech (@jeniczech) on CodePen

Link to comment
Share on other sites

Hey Jeniczech and welcome to the GreenSock forums. 

 

This is because you disabled the pinSpacing for your pinned ScrollTriggers, so ScrollTrigger is not adding extra space. Thus the footer (or anything after your last pinned section) gets covered by the pinned content.

 

A simple solution is to add margin-top to the footer (or whatever comes after the last pinned section):

See the Pen YzGoJwq?editors=0100 by GreenSock (@GreenSock) on CodePen

  • Like 3
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...