ManuC12 Posted July 28, 2021 Share Posted July 28, 2021 Hi, I have a few section tags of 100vh each one, and I want to have a pinned element that stay pinned during all this elements until the end, and when it enter in each section it change direction, from left to right, then right to left in each one, I tried by putting the element I want to move in absolute position, and try to animate from left:0 to right:0 but I see that this won't work, I would appreciate any help about how could I get this working, I let a codepen with what I tried so far See the Pen OJmvbZg by ManuC12 (@ManuC12) on CodePen Link to comment Share on other sites More sharing options...
GreenSock Posted July 28, 2021 Share Posted July 28, 2021 Here's how I'd do it: See the Pen KKmoaqY?editors=0010 by GreenSock (@GreenSock) on CodePen Is that what you're looking for? 1 Link to comment Share on other sites More sharing options...
ManuC12 Posted July 28, 2021 Author Share Posted July 28, 2021 5 minutes ago, GreenSock said: Here's how I'd do it: Is that what you're looking for? Hi! Thank you very much, yes it was that but I want it the element to move directly from the left to the right with no transition, like in section one it being on the left then as soon as it hit section two it goes all to the right directly with no transition, is there a simple way to addapt your example to that?, thank you for your time anyway ! Link to comment Share on other sites More sharing options...
Solution GreenSock Posted July 28, 2021 Solution Share Posted July 28, 2021 Here's another approach: See the Pen abWYpap?editors=0110 by GreenSock (@GreenSock) 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