Jump to content
Search Community

Scroll Snap different height section

MohitR test
Moderator Tag

Go to solution Solved by Cassie,

Recommended Posts

  • Solution

Heya!

So you'll need to pass an array with some values that represent each scroll snap point.

 

The start of the scroll is 0 and the end is 1 - with that in mind you can calculate each point using the height of the page and the offset top of each section.

 

Something like this - 


See the Pen QWBQGqp?editors=1010 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...