Jump to content
GreenSock

Sukru

Scroll section height animated

Recommended Posts

Hello, I want to reduce the initial section height while scrolling and I do this, but there is a space between the section below it? Can you help?

See the Pen MWXNrZJ by sukruemanet (@sukruemanet) on CodePen

Link to comment
Share on other sites

Hi there!

 

If you animate to 50vh from 100vh then you'll get a gap because the rest of the elements don't move into the space created.

You can get around it by setting your element up in the end position - 50vh and animating from 100vh.

See the Pen yLEmKVG?editors=0010 by GreenSock (@GreenSock) on CodePen



Hope this helps!

  • Like 2
Link to comment
Share on other sites

@Cassie Thank you very much for the help. Could this effect be smoother? Because when it comes to the writing area, it stays hard and when you pull it down, it moves the same hard way.

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