Jump to content
Search Community

A simple scale in a SVG won't scale from bottom - only from top

Devotee007 test
Moderator Tag

Go to solution Solved by Sahil,

Recommended Posts

  • Solution

Main issue comes from setting scale in CSS, not sure if it is a bug or technical limitation. Also, if you set transform origin in CSS then rect will scale from bottom of SVG. It is not visible in your example but if svg has more height than rect then it will be visible. GSAP correctly sets transform origin and element will scale from expected position. So for now I would recommend setting scale using gsap and maybe transform origin as well.

See the Pen rNgEdmm by SahilAFX (@SahilAFX) on CodePen

  • Like 1
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...