Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

163
Vistas
Smooth / Momentum Scroll on window without a container

I'm trying to simulate the buttery scroll on mac os / ios, often referred to as "inertia scroll" or "momentum scrolling", as you're going through the page.

Everything I found so far uses a transform3d to shift your content around and they manipulate this through some easing js function.

The issue with using a transform3d is that you can't use position: sticky or position: fixed anywhere in your app, thanks to this beauty: Positions fixed doesn't work when using -webkit-transform

I'm trying to figure a less intrusive way to build the same functionality, except without the container that all of these libraries are using.

I've tried a lot of things from messing around with the existing window scroll event to emit a new one with smooth scroll, hopefully with the right inertia values, to researching a way to do this via pure css.

Does anyone know if this is even possible?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I'm actually going through the same thing right now, it's funny that this question popped up right as I was looking for a solution.

The only thing I found thus far is to use this: https://github.com/BCJdevelopment/butter.js

My fixed position element is the navigation bar. It becomes fixed on scroll.

So what I did was I encapsulated all my scrollable body content, after my navigation bar, in a DIV with a "button" ID.

On scroll, the navigation bar turns fixed but the rest of the content is scrollable.

<body>
    <div class="fixed-navigation-bar"> ... </div> <!-- The position fixed element -->
    <div id="butter"> <!-- The JS targets this and everything within it has smooth scrolling enabled -->
        <div class="rest-of-website-content"> ... </div>
    </div>
</body>

This works, but on Chrome the scrolling is super laggy and I'm searching for a solution with better performance.

Hope this helps at least a bit.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda