Jump to content
Search Community

Gap at scrollbar position with scrollTrigger

PedroZorus test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

Hello everbody, I'm trying to create a sticky effect with my logo. All is ok, but the pin-spacer auto-resize my element with the scrollbar size as right gap.

I don't understand what I'm not doing correctly 😕.

Capture.JPG.b880c799deebc9f7397e1380c5037625.JPG

 

Also, I want to get your advice about my function to made the logo sticky till the end of my page (In the codepen). It's a good practice or not ?

See the Pen WNZOLwL by pierredarrieutort (@pierredarrieutort) on CodePen

Link to comment
Share on other sites

Hello Ali, thank you for your answer but I would like to favor a cleaner solution, without hotfix including `!important` which can cause side effects.

 

If someone can explain me the Why of this bug in scrollTrigger and how to prevent it properly; and if my function to sticky till the page end is clean or if an alternative exists, I will appreciate.

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