Jump to content
Search Community

Height Direction?

rojo test
Moderator Tag

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

It's possible to control the transformOrigin of scale, rotation, etc. But what about the height? I want to tween (from 0 to 300) the height of an element from the bottom but by default it tweens from the top (grows from top to bottom).

Link to comment
Share on other sites

Unfortunately that is indeed how things work in the browser - width and height are VERY different than transform data, especially in terms of document flow (transforms don't change where the object would normally line up in the flow of the document whereas width/height do). You could, of course alter scaleY instead and maybe just doe the math to figure out the percentage you need. I wish I had a simple solution for you.

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