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

226
Views
animación de desplazamiento de opacidad pero invertida (Javascript)

Tengo una animación de desplazamiento para las nubes, pero la animación debería invertirse. La forma en que funciona ahora es que desaparece cuando está completamente desplazado hacia arriba, pero debe ser al revés. www.wytsepunter.com (también es muy lento en el teléfono, ¿algún consejo para hacerlo más fluido?)

Aquí está el código:

 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
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!