Jump to content
Search Community

Question about pinning and scrolltrigger

phernand42 test
Moderator Tag

Recommended Posts

Hi Everyone, 

 

Having a small issue with using the pin property in scrolltrigger. I have a multi layer svg inside of a single div. When you scroll down different layers of the svg should appear and other layers should hide. I was able to accomplish this (with the help from this amazing forum) using css (position: fixed) but I'd like to see if this is possible using the pin property instead. As you can see from my pen when I scroll down all the layers appear. The scrolling svg should stop at the top of the second container div. 

 

Should I be using pin this way or should I separate the svg layers I have into separate svgs and add each in to separate divs so I can get pin to work?

 

Thanks!

See the Pen eYzMEVM?editors=0010 by phernand42 (@phernand42) on CodePen

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