Share Posted January 15, 2017 Hey everyone, lets say I have a div with text inside. tweening the scaleX squishes the text inside but tweening the width, correctly only animates the div.. TweenMax.to(header, 2, {delay: 2.2, width:"0px"}); //vs TweenMax.to(header2, 1, {scaleX: .5, delay:.2,transformOrigin:"0% 0%"}); Ques: Is there a way to scale using transform/scale without scaling the text inside the division or is that just how CSS works... on initial search, i didnt see this discussed elsewhere Thanks in advance, alwayz See the Pen dNpyzj by dwayneaneckles (@dwayneaneckles) on CodePen Link to comment Share on other sites More sharing options...
Share Posted January 15, 2017 The trick here is to increase the scale of the contents to compensate the decrease in scale of the parent. Something like: See the Pen PWGzzV?editors=0010 by anon (@anon) on CodePen Although, it's not perfect (the easing is a bit off), but it should give you somewhere to go from. Also note that text wrapping won't work correctly because you're stretching it, as opposed to adjusting the width. 1 Link to comment Share on other sites More sharing options...
Author Share Posted January 15, 2017 Thanks Kez, yea no it doesnt look good doing that im fine with using the width. I just wanted to make sure, there wasnt something in the docs i was missing. trying to do things the "right" way. its not an issue 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