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

285
Views
sesgar el texto en el desplazamiento, cómo orientar la clase en lugar de la sección

Encontré este efecto de desplazamiento en Codepen. ¿Es posible ajustar el código para que pueda apuntar líneas de texto por clase '.hometext', en lugar de apuntar a toda la sección '#work' como lo hace actualmente?

 const section = document.querySelector("#work"); let currentPixel = window.pageYOffset //looper keeps running and keeps track of where the new pixel is const looper = function () { const newPixel = window.pageYOffset; const diff = newPixel - currentPixel const speed = diff * 0.05; section.style.transform = "skewY(" + speed + "deg)" currentPixel = newPixel; requestAnimationFrame(looper) } looper();
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

document.querySelectorAll => matriz de elementos y luego para elementos

 const section = document.querySelectorAll(".hometext"); let currentPixel = window.pageYOffset //looper keeps running and keeps track of where the new pixel is const looper = function () { const newPixel = window.pageYOffset; const diff = newPixel - currentPixel const speed = diff * 0.35; //for of elements for(let el of section){ el.style.transform = "skewY(" + speed + "deg)" } currentPixel = newPixel; requestAnimationFrame(looper) } looper();
about 4 years ago · Juan Pablo Isaza Report
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!