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

121
Views
¿Cómo hacer un efecto de paralaje en la imagen de fondo al cambiar el control deslizante del guardabosques?

Estoy tratando de crear un efecto de paralaje en la imagen de fondo cuando muevo el control deslizante. Decidí simplemente cambiar la posición del fondo en la imagen, pero no estoy del todo seguro de que sea una buena solución. Dígame cómo mejorar dicho efecto para que la imagen en el fondo se mueva más suavemente, por lo que realmente se llama paralaje.

 const p = document.getElementById("price"); const bg = document.getElementById("bg"); p.addEventListener("input", function() { bg.style.backgroundPosition = `${p.value}% 50%`; }, false);
 .parent { display: flex; width: 500px; height: 300px; justify-content: center; align-items: center; background-image: url('https://wallpaperaccess.com/full/99840.jpg'); background-size: cover; background-repeat: no-repeat; } .child { width: 50%; background-color: #fff; padding: 5%; }
 <input id="price" type="range" value="" /> <div class="parent" id="bg"> <div class="child"> Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nam officia voluptatem, sint voluptatibus. Cumque vel voluptatem voluptatibus quisquam corporis nam, fugit maxime, architecto similique natus, ipsam enim eveniet recusandae odio. </div> </div>

about 4 years ago · Santiago Gelvez
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!