Jump to content
Search Community

ScrollTrigger: Sticky effect

iamjonas test
Moderator Tag

Recommended Posts

Hi @iamjonas and welcome to the GreenSock forums!

 

Indeed the issue relies on the end position for the ScrollTrigger instance, but mainly because you are using an element that, because of the CSS, uses the entire height of it's parent element. Is better to use just the height of the image plus the top and bottom padding.

 

Here is a live example:

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

 

Hopefully this helps you getting started. Let us know if you have more questions.

 

Happy Tweening!

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