Jump to content
Search Community

Why does transformOrigin not work?

AlexanderGS test
Moderator Tag

Go to solution Solved by Carl,

Recommended Posts

  • Solution

Thanks for the demo. 

transformOrigin only applies to transforms like x, y, rotation, skew, scale.

 

width and height are not transforms

 

for what you want to do I suggest using scaleX.

 

I wasn't sure where you want the line to start and end, but hopefully this demo points you in the right direction.

feel free to play with the values.

 

See the Pen WNKVYGV?editors=1010 by snorkltv (@snorkltv) on CodePen

  • Like 4
Link to comment
Share on other sites

58 minutes ago, Carl said:

Thanks for the demo. 

transformOrigin only applies to transforms like x, y, rotation, skew, scale.

 

width and height are not transforms

 

for what you want to do I suggest using scaleX.

 

I wasn't sure where you want the line to start and end, but hopefully this demo points you in the right direction.

feel free to play with the values.

 

 

 

Explained how it works, and even showed an example.😮 Thank you for your help!😄

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