Jump to content
GreenSock

coco

Image fade from zero and move position

Go to solution Solved by Diaco,

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hi guys

I'm stumped on trying to figure this out: fading in an image and moving it from left (or from anywhere) at the same time.  I don't know why it's eluding me and am hoping you can lead me in the correct direction.  I created a simple codepen for this.  I think I am confusing my syntax here or missing something basic.

 

thanks!  :) 

See the Pen jbgqLj by nushi (@nushi) on CodePen

Link to comment
Share on other sites

  • Solution

Hi coco  :)

 

pls try like this :

.fromTo(".img",1,{opacity:0,x:-30},{opacity:1,x:100});   

// or  .fromTo(".img",1,{autoAlpha:0,x:-30},{autoAlpha:1,x:100});   

pls check CSSPlugin Doc. : http://greensock.com/docs/#/HTML5/Plugins/CSSPlugin/

 

you don't need to use css:{} wrapper , but if want ; 'x' property should be in css wrapper

  • Like 1
Link to comment
Share on other sites

Hi Diaco!  Thank you.. 

I really screwed that one up..   :)   It's so simple!

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