Jump to content
GreenSock

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

Animated elements jump after resizing the browser window

Recommended Posts

Hi,

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? 

 

divider.gif.f524f220701b42ac32a59f255f3cc577.gif

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