Jump to content
Search Community

Is it possible to make pin with delay and smooth transition?

AsKadir test
Moderator Tag

Recommended Posts

Hey!

I have a question about pinning in ScrollTrigger.

Is it possible to make pinning with scrub?

I mean when I scroll, pinned element should catching up its fixed position with smooth ease.

I understand that it uses position: fixed, so I can't imagine how it can be done.

 

Can you give me advice, please?

See the Pen NWxgyoM by ChicagoJostik (@ChicagoJostik) on CodePen

Link to comment
Share on other sites

23 minutes ago, ZachSaucier said:

Are you talking about creating an effect like this site? https://www.marvinschwaibold.com/

@ZachSaucierHey, Zach!

No, I mean when element is pinned, you scroll down and element is moving with the same speed as scrollbar, right?

But what if we can make when you scroll, pinned element will move with some delay relatively to scrollbar.

 

For example, popular gsap cursor animation, if we use gsap.set() it will be deadly pinned to cursor, but if we use gsap.to() with some duration,

the cursor will be moving with duration, right? So in my codepen pinned element is the cursor with gsap.set(), but I want to make gsap.to() with duration.

 

Did you undestand my explanation?) I'm so sorry.

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