Jump to content

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

Space gets created when i pin an element with scrolltrigger.

Go to solution Solved by ZachSaucier,

Recommended Posts

Hi everybody, 
It's my first timing using scrolltrigger and i have an issue that i can't seem to solve. I want to animate scroll effects inside the pinned blue container, like the white bg sliding over the blue one.
But the pinning of the container creates a space above and beneath while scrolling through page. Long story short, i want the green blocks to stay in place. Right above and beneath the container. 
Please help :)

See the Pen KKgVVMg by Samlinck (@Samlinck) on CodePen

Link to comment
Share on other sites

  • Solution

Hey samlinck. If you want the green sections to remain pinned, I recommend pinning a container of both the green and blue sections :) 

pin: ".container"


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