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

180
Views
Tenga este código para que cuando un usuario presione la tecla hacia arriba o hacia abajo, el globo crezca o se encoja. Necesita que el globo explote a "💥" cuando alcanza un tamaño de fuente superior a 70

Hasta ahora, el globo solo debería poder alcanzar un máximo de 70 fuentes antes de que explote. Necesito convertir el globo en "💥". El detector de eventos debe eliminarse cuando estalla el globo.

 let para = document.querySelector('p'); para.style.fontSize = '24px'; window.addEventListener("keydown", e => { var sizeAsInteger = parseInt(para.style.fontSize, 10); if (e.key == "ArrowUp") { sizeAsInteger += 10; } else { sizeAsInteger -= 10; } para.style.fontSize = sizeAsInteger + 'px'; });
 p { font-size: 50px; }
 <body> <p>🎈</p> </body>

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

¿Es esto lo que quieres?

 let para = document.querySelector("p"); para.style.fontSize = "24px"; const increaseSize = e => { var sizeAsInteger = parseInt(para.style.fontSize, 10); if (sizeAsInteger >= 70) { window.removeEventListener("keydown", increaseSize); return (para.innerHTML = "💥"); } if (e.key == "ArrowUp") { sizeAsInteger += 10; } else { sizeAsInteger -= 10; } para.style.fontSize = sizeAsInteger + "px"; }; window.addEventListener("keydown", increaseSize);
 p { font-size: 50px; }
 <p>🎈</p>

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!