designer92 Posted March 11, 2021 Share Posted March 11, 2021 Hello, I would like to animate an h1 in red panel (line 18 to20 in JS file), but I couldn't make it happen. can someone know why please? thanks ! See the Pen jOVXGbZ by designer92 (@designer92) on CodePen Link to comment Share on other sites More sharing options...
Patrick Rijkee Posted March 11, 2021 Share Posted March 11, 2021 See the Pen zYoyEmO by parpar78 (@parpar78) on CodePen Hey there, The animation has already finished before you scroll, you can see the animation if you add a duration like i did here. But you probably want to look into something like adding a scrolltrigger (https://greensock.com/docs/v3/Plugins/ScrollTrigger) to start the animation at the right time. Take a look at what they did with the other animation in the codepen and check out the docs for more info. Kind Regards, Patrick Rijkee 3 Link to comment Share on other sites More sharing options...
designer92 Posted March 11, 2021 Author Share Posted March 11, 2021 Thanks Patrick ! I tried to put a duration like you did to animate the number 1 ( line 23 of the codepen JS) to do a simple rotation, but not only it is not working. but it is slowing things. See the Pen mdOQgJZ?editors=0010 by designer92 (@designer92) on CodePen Link to comment Share on other sites More sharing options...
Patrick Rijkee Posted March 11, 2021 Share Posted March 11, 2021 See the Pen dyOwdeX by parpar78 (@parpar78) on CodePen position the tweens at the correct time like i did here, i also made the duration a bit shorter. in your version the rotation plays before the sections start sliding, that caused it to delay and for the rotate to not be visible. Is this what you are looking for? 2 Link to comment Share on other sites More sharing options...
designer92 Posted March 11, 2021 Author Share Posted March 11, 2021 yes, thanks Patrick , I need to study more the scrolltrogger's docs 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