Xenex122 Posted May 18, 2022 Share Posted May 18, 2022 So I have a problem wherein I want to do a scrolling vertically and pin the "parent" in the codepen and then If I ever scroll the...the animation that goes upward it will go upward if it scroll and if the animation downwards if it scroll too but the parent must be pin so I put a pin there in my codePen so it was all set up but I don't know if this is the right method to do...Can you guys give me a hint or any link where I can do that? I want to pin the "parent" and then when I scroll the opposite animation will go up and down once I scroll down. If anyone could help me it will be a big help. See the Pen ExQmYXM by myth-vince (@myth-vince) on CodePen Link to comment Share on other sites More sharing options...
Solution mvaneijgen Posted May 18, 2022 Solution Share Posted May 18, 2022 I was not sure about your question, but what I think you mean is something like this? I've created one timeline (I removed the CSS animations, because we are using GSAP). The left element moves up and the right element moves down and when you scroll in reverse the animation will play in reverse. Both these items have there own animation, but with the Position Parameter they will both start at the same time See the Pen GRQmKVv?editors=0010 by mvaneijgen (@mvaneijgen) on CodePen 2 Link to comment Share on other sites More sharing options...
Xenex122 Posted May 18, 2022 Author Share Posted May 18, 2022 yes this is better thank you but can I know if how I will animated each box when I scroll it down? Thank you sir Link to comment Share on other sites More sharing options...
mvaneijgen Posted May 18, 2022 Share Posted May 18, 2022 3 minutes ago, Xenex122 said: you but can I know if how I will animated each box when I scroll it down? Can you elaborate what you mean? Each box in the right column is moving down on scroll at the moment right? Link to comment Share on other sites More sharing options...
Xenex122 Posted May 18, 2022 Author Share Posted May 18, 2022 Let say I have scroll down then each of the side of content will go up and down but I want per boxes to animated when I scroll down up or down...but the boxes will animated based on the scroll..if its up the animated will be like something skewY(90deg) and if down then skewY(-90deg) per boxes. Link to comment Share on other sites More sharing options...
mvaneijgen Posted May 18, 2022 Share Posted May 18, 2022 I really recommend just forking my demo and just play around with everything that is possible. Keep forking the pen and keep playing around until you find something that you are happy with. Here is a demo with skewY animations See the Pen PoQmoEB?editors=0010 by mvaneijgen (@mvaneijgen) on CodePen 1 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