mrgreen Posted November 12, 2021 Share Posted November 12, 2021 Hi, I wanted to ask what the best approach is when having a container (with "position: absolute") that has content inside which is longer than the viewport on mobile and requires the user to scroll. Does ScollTrigger automatically detect that the container requires the user to scroll and does it allow it without clashing with the actual trigger progression? I tried using "height: 100%; overflow-y: scroll;" for the container but the scrolling of the container clashes with the scrolling progression of ScrollTrigger. Link to comment Share on other sites More sharing options...
GreenSock Posted November 13, 2021 Share Posted November 13, 2021 I'm not sure I understand your question (it's tough without a minimal demo), but ScrollTrigger doesn't interfere with or control native scrolling. It doesn't do any scroll-jacking. Just use the "scroller" property to set your ScrollTrigger to be relative to whatever element you want (the one that has the scrollbar) - by default, it's the body/documentElement. If you still need some help, please provide a minimal demo and we'd be happy to take a peek. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now