Jump to content
Search Community

ScrollSmoother & Absolute Positioning/Stacked Elements

samwatts1988 test
Moderator Tag

Go to solution Solved by Rodrigo,

Recommended Posts

Hello!

 

I'm just getting my head into ScrollSmoother (looks awesome) and I'm attempting to incorporate this into a project I'm working on, which features two absolutely positioned full width and height sections which are layered over the top of one another using z-indexing. 

 

The idea is to transition one section upwards until it's no longer in the viewport and reveal the other section which is layered beneath it. I've got a bit of previous basic GSAP knowledge and have managed to get this part working, however when I introduce ScrollSmoother it appears to break the upwards animation which no longer seems to run. 

 

I believe I've set ScrollSmoother up as per the docs, so it'd be great to see if there's something I might have missed in the setup here or any pointers that might get me moving in the right direction again. All advice greatly appreciate, basically! 

 

I've included a minimal demo on CodePen. If you comment the ScrollSmoother in and out you'll be able to recreate the issue I've encountered. 

 

Many thanks in advance for any help provided here!

 

Best, 

 

Sam

 

See the Pen wvxmzVL by samwatts1988 (@samwatts1988) 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...