Jump to content
Search Community

A very newbie question: when 'x' works and 'left' does not.

cerulean test
Moderator Tag

Go to solution Solved by ektorp,

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

I am working with the HTML5 banner example from Greensock and started trying to do my own banner, commenting out most of the GS code, and have a very newbie (i.e., ahem, probably stupid) question: why will a simple animation from left to right (of a div or an image) work when I use 'x' and not 'left'?

 

I understand that 'x/y' uses transforms, and 'left/top' uses CSS, so I thought it might have something to do with the CSSPlugin not loading — so I tried it with TweenMax directly (which should include the plugin, right?)

TweenMax.to($monkey, 0.2, {left:400, rotation:30});

The rotation works, the lateral movement, no.

 

This does, however

TweenMax.to($monkey, 0.2, {x:400, rotation:30});

What's my obvious error?  Is there an init call to CSSPlugin I'm lacking? I compared the GS example and mine, but am missing it.

 

BTW, if I use TimeLineLite (or Max), is the CSSPlugin init'ed automatically?

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