Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

101
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda