Kandashi Posted February 8, 2021 Share Posted February 8, 2021 Hey all, new GSAP user here. I cant seem to find a way to make a element rotate around an external point (not within its boundries). Im sure its an easy fix, but I'm not well versed in this Thanks in advance Link to comment Share on other sites More sharing options...
akapowl Posted February 8, 2021 Share Posted February 8, 2021 Hey @Kandashi - welcome to the forums. Setting a transform-origin is what you'd probably want to do. See the Pen d190ceb92fda39f45ea357f0d6ba3295 by akapowl (@akapowl) on CodePen 3 Link to comment Share on other sites More sharing options...
Kandashi Posted February 8, 2021 Author Share Posted February 8, 2021 Ahh, so you can set the origin external to the image itself. Good to know If this is the child , the orgin point is set off the parent right? Link to comment Share on other sites More sharing options...
Solution akapowl Posted February 8, 2021 Solution Share Posted February 8, 2021 Whoops, sorry. I just realized I linked to the german page - updated it to the english one. 17 minutes ago, Kandashi said: If this is the child , the orgin point is set off the parent right? I'm not sure if I understand your question, but the point is always set on the element itself. The start being the top left corner of the element itself at 0px 0px or 0% 0% ( X and Y - you could also mix absolute and relative values if you wanted ) See the Pen b7b5699e20efdaad816a1748db06b0de by akapowl (@akapowl) on CodePen I think the updated link to MDN WebbDocs should provide all the clarity you need on that. 1 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