Jump to content


Create smooth anim like in example

Moderator Tag

Recommended Posts

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

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.


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