Henrik Hansen
Henrik Hansen

Reputation: 2190

Making an element "fixed" if it's being scrolled out

So, I have an element on a webpage that is located under some other elements. This element should, whenever it hits the top of the page be fixed (ie. it shouldn't leave the view.)

I've seen this being done on the Webkit Inspector in the resources tab.

Does anyone know how to replicate this feature/effect?

Upvotes: 1

Views: 217

Answers (1)

Christian C. Salvadó
Christian C. Salvadó

Reputation: 828002

I think that the behavior you want is similar to the desired on this question, check this example.

Upvotes: 1

Related Questions