Jump to content


<section> height doubles when animating

Moderator Tag

Recommended Posts

As you can see from this gif, for some reason my <section> is doubled (the original one is 100vh and with a bg of light blue), why does it happen? How can I fix it? Because I dont want another 100vh of unused space. Im new to GSAP, so im still learning. In the codepen I made the background of the parent pink to make it see better.

See the Pen LYBOXry by Lko3001 (@Lko3001) on CodePen

Link to comment
Share on other sites

Hi @lko and welcome to the GreenSock forums!


Actually I can't replicate the behaviour from the gif on codepen. This is a fork of your codepen and the only change I made was to remove the pink background:

See the Pen jOpaRrP by GreenSock (@GreenSock) on CodePen


Sorry but I don't see the issue here, the light blue section is always 100vh that doesn't change. Is that how this is supposed to work?


Let us know if you have more questions.


Happy Tweening!

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.