Jump to content
Search Community

Pin diferents sections

Juan90 test
Moderator Tag

Recommended Posts

Hello, I am new using the gsap library.

I would like to know why the following behavior occurs.
In my code I have a red square, with a fixed position, which should change color as it enters different sections.

What happens is that if I change the aspect of the window or move from front to back, all start and end are offset.

Can someone explain to me what is happening and how to fix it?

Thank you

See the Pen LYQqKBB?editors=1010 by NachoYama90 (@NachoYama90) on CodePen

Link to comment
Share on other sites

Thank you Cassie, but I might have another problem with it...

I was trying to use the pin feature, and I had some animations in each section. Also, I created a serie of scrollstriggers to animate them. When doing that, I found that the pin sections are positioning absolute, and it loses it the references to the scroll that I need.

 

I looked for this issue, and I found the pinnedContainer. But I'm not sure. 

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.
×
×
  • Create New...