Jump to content

Search In
  • More options...
Find results that contain...
Find results in...

Animated elements jump after resizing the browser window

Recommended Posts


I have a question regarding my animated section dividers. When I change the size of the browser window the divider "jumps" ugly (it is not smooth as it was before resizing the window):


After refreshing the browser it's fine again. How can I prevent it? 



See the Pen WNEbeQe by zofiaifoz (@zofiaifoz) on CodePen

Link to comment
Share on other sites

OK, I found a way to do this. I just changed gsap.from to gsap.to (and updated the heights of course - so in CSS i have initial values). Now everything works as it should when changing the size of the browser window.


See the Pen RwZNRJa by zofiaifoz (@zofiaifoz) on CodePen

  • Like 2
Link to comment
Share on other sites

Awesome! Nicely figured out Zofia

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