ImDIno Posted December 24, 2020 Share Posted December 24, 2020 I need to use scrolltrigger as a substitute for scrolling down a webpage the same way a normal scroll would behave. Please don't ask why. Two problems: 1. scroll-to-transform ratio is affected by yPercent and height of the pseudo div, probably even the viewport size. 2. scroll is not linear, towards the end it always takes more scrolling the further you go. See the Pen GRjORom by dino-paariz (@dino-paariz) on CodePen Link to comment Share on other sites More sharing options...
ZachSaucier Posted December 24, 2020 Share Posted December 24, 2020 Hey Dino and welcome to the GreenSock forums. Several things you should change: Your trigger should be the tallest content, in this case the #pseudo-div container. Your start and end positions should be changed. Your calculation for how far off the #content section should be corrected. We recommend using the condensed string form for eases. You can drop the label as it's not necessary. Altogether: See the Pen PoGOoRQ?editors=0010 by GreenSock (@GreenSock) on CodePen Happy tweening and Merry Christmas! 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