Share Posted November 17, 2019 I'm trying to make animation like this. First of all, i wanna create smooth move of green div like in example. Here is my try : If compare my and example's animation, in example it's more smoothly. How can i make my anim more similar to an example? See the Pen VwwqaBp by eugenedrvnk (@eugenedrvnk) on CodePen Link to comment Share on other sites More sharing options...
Share Posted November 17, 2019 Don't animate left and top. Use x and y. And animating width is also slow. Sometimes, you can animate scaleX instead of width, but that can be tricky if there are children inside the container. You can also set will-change:transform; in your CSS. https://developer.mozilla.org/en-US/docs/Web/CSS/will-change 1 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