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

227
Vistas
opacity scroll animation but reversed (Javascript)

I have a scroll animation for the clouds but the animation should be reversed. How its working now is that it dissapears when its all the way scrolled up but it needs to be the other way around. www.wytsepunter.com (also its very laggy on phone any tips for making that smoother?)

Here is the code:

let bg = document.getElementById('bg');
    let moon = document.getElementById('moon');
    let rock = document.getElementById('rock');
    let clouds = document.getElementById('clouds');
    let text = document.getElementById('text');

    window.addEventListener('scroll', function (){
        var value = window.scrollY;

        bg.style.top = value + 0.5 + 'px';
        moon.style.left = value * 0.5 + 'px';
        clouds.style.top = value * 0.5 + 'px';
        clouds.style.opacity = value * 0.5 + '%';
        text.style.top = value * 1 + 'px';
about 4 years ago · Juan Pablo Isaza
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