Jump to content
GreenSock

Learning

Transform stacking

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 am trying to rotate and scale my header image when the site loads using the following script,

 

TweenMax.from( '#myGroup', 6,
{ scale: 0, rotation: 360, ease: Expo.easeOut, transformOrigin: '50% 50%' });
 
It works fine except when I refresh the page, it goes off center.
Apparently checking the source on site, it shows that it stacked two transformations...
But isn't a refresh of the page supposed to clear and restart things?
How do I solve this issue?
It doesn't appear on local, only when it's on the server.
Link to comment
Share on other sites

Hi Learning  :)

 

it's not possible unless you store transformation info and set again on page load , but in your case seems another js or css have effect on same element ,

 

i think that's better to make a reduced Codepen Demo of your case How to Create a CodePen Demo

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