This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Vince Li
Posted Aug 30 - Read on Facebook

Hey guys, what's the simplest way to make the red layer sticky as soon as it reaches the top?

Thanks in advance!


Chad Smith

Hey Vince, add the code in this image to the bottom of your code.

First, stack your red rectangle on top of the other elements using it's z property. Then, we write a conditional that says "if scroll's scrollY property is above 470, just keep red's y property at the same value."

Vince Li

thanks Chad!! I also included an else, otherwise when scrolling up the y coordinates are different

Tarun Chakravorty

cc Nathanael - this is a better explanation that the one i was giving a few months back :P

Read the entire post on Facebook