KST Posted March 24, 2021 Share Posted March 24, 2021 Hi, I want to make the same effect as this site. When scrolling page down and up fast, this will not work as expected (opacity is not correct). Is there anyway to improve this code? Thanks! See the Pen abpbrxN by tiffk935 (@tiffk935) on CodePen Link to comment Share on other sites More sharing options...
akapowl Posted March 24, 2021 Share Posted March 24, 2021 Hey @KST I think it is just a problem of the order of your ScrollTriggers in your code. When I put the creation of the first ScrollTrigger in your code below the second (which makes sense because its start and end are set to trigger after the second ScrollTrigger in your code) I can not seem to reproduce the issue anymore. Is that better for you? See the Pen 2b7a890e5b976bbcb2d2127b5e63ba92 by akapowl (@akapowl) on CodePen 2 Link to comment Share on other sites More sharing options...
GreenSock Posted March 24, 2021 Share Posted March 24, 2021 Here's a totally different way you could set it up that delivers a different "feel" (which I personally prefer): See the Pen OJWyLwp?editors=0010 by GreenSock (@GreenSock) on CodePen Enjoy! 4 Link to comment Share on other sites More sharing options...
mikel Posted March 25, 2021 Share Posted March 25, 2021 Hey Jack, cool idea to use slow ease. See the Pen BapNwxd?editors=1010 by mikeK (@mikeK) on CodePen Happy easing ... Mikel 2 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