Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

99
Views
locking an element at the center of the screen for y amount of scroll

I want to create a scroll animation on my webpage.

And my plan is to have the user scroll down the page and a word coming into view from the bottom of the page. (basically just a decently sized margin-top)

The issue is that I don't want the user to be able to "just" scroll past this word. I want the word to "stop" moving together with the scroll for a certain scroll distance when the word hits the center of the screen.

I can probably code some js to get this effect by checking the scroll position and changing the top value of some element. But I am afraid of it stuttering, so is it possible to do something like this in pure css, or if not: is there any way of doing it in js and making sure that it is smooth?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!