Share Posted May 12 I wanted to ask, does gsap take into account the transform-origin property when I place an object with the property X ? I'm trying to position the box you see in the image with gsap.set, setting the X property to 0, but I see that by changing the transfer-origin parameter in the css I don't get the results I expect as I show in the image, but it always remains as if the transfer-origin property were set to 0,0 Link to comment Share on other sites More sharing options...
Solution Solution Share Posted May 12 Transform (scale, rotation) default points are in the center of HTML elements. Translation (x/y) is top left. If you want it to be in the center, try this. gsap.set(".box", { xPercent: -50, yPercent: -50 }); Link to comment Share on other sites More sharing options...
Author Share Posted May 12 oh ok, thanks...now it work Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now