Jump to content
Search Community

position in gsap dont work

koub test
Moderator Tag

Recommended Posts

Welcome the forums @koub

 

That won't work like you are expecting because the previous animation durations aren't long enough. You should just start b first, and then delay a.

 

let t = gsap.timeline();

t.to(".b", { duration: 5, x: 100 });

t.to(".a", { duration: 5, y: 500 }, 20);
t.to(".a", { duration: 5, y: 0 });


t.to(".b", { duration: 5, x: 500 });

t.from(".c", { duration: 5, x: 100 });

t.fromTo(
  ".d",
  { x: 100, scale: 0 },

  { duration: 5, x: 500, scale: 1 }
);

 

  • Like 1
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...