Jump to content
Search Community

Move a pinned element from left to right in each container intersection

ManuC12 test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...