Jump to content
Search Community

ScrollSmoother deactivates ScrollTrigger

LenaPont test
Moderator Tag

Go to solution Solved by Cassie,

Recommended Posts

  • Solution

Ok, so with ScrollSmoother you're animating the content inside the wrapper - that's what makes it smooth, so you can think of the content div as your 'body'

Because your new 'body' is a transformed div, you can't position things 'fixed' inside that. (It's just how the browser spec works)

So there's a few things you'll need to do

 

1) Make sure you're targeting the right classes. In your demo you have smooth-... in your JS and scroll-... in your HTML

2) Adjust the height of the smooth-content instead of the body

3) Use absolute positioning instead of fixed

 

See the Pen poVJBGo?editors=0010 by GreenSock (@GreenSock) on CodePen

 

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