Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Tom von Mom

Can't get GSAP off the ground

Recommended Posts

To animate element's top or left properties you need to set it's position. Animating left, top can give you poor performance because it causes browser repaint every time you animate top, left. Instead you can x, y for transformation.

 

See the Pen QOvpPv by Sahil89 (@Sahil89) on CodePen

 

  • Like 6
Link to comment
Share on other sites

Makes total sense! Weird it wasn't mentioned in the introduction scripts…

 

TOM

Link to comment
Share on other sites

HI Tom von Mom,

 

Sorry to hear you hit a snag.

We rarely recommend that folks animate left and top.

Where we show that in the getting started video we make a note of setting the position property at 1:33

 

It's also mentioned in the video description on youtube. 

If there's somewhere else on the site we have examples of animating left and top that need better descriptions please let me know.

 

Thanks.

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