tyte Posted August 4, 2020 Share Posted August 4, 2020 I'd like to animate a div from 0 to full width. As far as I understand using "width" for animation is not a recommended method from performance perspective. Could someone please guide me what approach could be used instead? Thank you! See the Pen QWNWjZZ by tyte (@tyte) on CodePen Link to comment Share on other sites More sharing options...
ZachSaucier Posted August 4, 2020 Share Posted August 4, 2020 Hey tyte. It's better to use transforms instead wherever possible. In this case you could use scaleX with a transform-origin of left center. See the Pen ZEWEQLG?editors=0010 by GreenSock (@GreenSock) on CodePen 3 1 Link to comment Share on other sites More sharing options...
tyte Posted August 4, 2020 Author Share Posted August 4, 2020 Thank you! 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