Jump to content
GreenSock

hastalavistababy

On scale change dom element size

Go to solution Solved by mvaneijgen,

Recommended Posts

  • Solution

Hey @hastalavistababy welcome to the forum! 

 

`scale` is part of the `transform` property of CSS and it does not interact with the flow of your content, so if you do want it so that elements are pushed around when things are scaled I would use the property `fontSize`

 

See the Pen ExoBoaz?editors=0110 by mvaneijgen (@mvaneijgen) on CodePen

 

I had to change your code a bit and had to set a fixed height on the `.logo` block, otherwise the block height would get recalculated based on the font size and you want it to stay at the bottom.

 

Also know you can use the plugin SplitText to dynamically split text on the fly no need to manually split any text

 

See the Pen XWVLVLm by mvaneijgen (@mvaneijgen) on CodePen

  • Like 6
  • Thanks 1
Link to comment
Share on other sites

On 4/26/2022 at 4:53 PM, mvaneijgen said:

Hey @hastalavistababy welcome to the forum! 

 

`scale` is part of the `transform` property of CSS and it does not interact with the flow of your content, so if you do want it so that elements are pushed around when things are scaled I would use the property `fontSize`

 

 

 

 

I had to change your code a bit and had to set a fixed height on the `.logo` block, otherwise the block height would get recalculated based on the font size and you want it to stay at the bottom.

 

Also know you can use the plugin SplitText to dynamically split text on the fly no need to manually split any text

 

 

 

You awesome, Thanks

  • Thanks 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.
×