Jump to content
Search Community

Pinning with smoothscroll

Jloafs test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

Hi guys

I'm having a few issues trying to work out how to pin an object when using scrolltrigger and scroll smooth.

Essentially I want the header element to be fixed to the bottom of the viewport until it hits the footer, then it will push up just like position sticky behaviour.

I have the feeling my pen is way off. I seem to have a huge viewport height element between the header and the <main> element for some reason and the positioning is not working at all as expected.

Does anyone have any thoughts on how to resolve?

Many thanks in advance for any help.

See the Pen GRejWYp by jloafs-DM (@jloafs-DM) on CodePen

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