Jump to content
Search Community

Moving Element from right to left

sameermemon test
Moderator Tag

Recommended Posts

Thanks for the quick solution Mikel.

 

 I used below code to solve the issue -

 

gsap.fromTo("#box",{
        x :  50,
        opacity : 0
    }, {
        x : 0,
        opacity : 1
    }); 

Let me know, if it is valid one.

Link to comment
Share on other sites

Hey @sameermemon,

 

Your code looks fine.

 

Be aware of the defaults of duration and ease if that is a point:

duration The duration of the animation (in seconds). Default: 0.5

 

ease Controls the rate of change during the animation, giving it a specific feel. Default: "power1.out"

 

Happy tweening ...

Mikel

 

  • Like 1
Link to comment
Share on other sites

5 hours ago, sameermemon said:

I used below code to solve the issue -

 

gsap.fromTo("#box",{
        x :  50,
        opacity : 0
    }, {
        x : 0,
        opacity : 1
    }); 

Let me know, if it is valid one.

It is valid, but you can just use a .from() tween like Mikel's demo and it'd be simpler :) 

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...