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

240
Views
¿Cómo agregar animación al cambiar el estilo del elemento en JS?

Quiero agregar una animación deslizable hacia abajo al elemento cuando la pantalla se configura en block , y una diapositiva hacia arriba cuando es none o '' , aquí está mi script js real:

 <script> function showQuick(element, icon) { var style = element.style if (style.display === '') { style.display = 'block'; icon.style.color = '#00FFFF'; icon.style.filter = 'drop-shadow(0 0 0.35rem #00FFFF)'; } else if (style.display === 'none') { style.display = 'block'; icon.style.color = '#00FFFF'; icon.style.filter = 'drop-shadow(0 0 0.35rem #00FFFF)'; } else { style.display = 'none'; icon.style.color = '#D2042D'; icon.style.filter = 'drop-shadow(0 0 0.35rem #D2042D)'; }; }; </script>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

solo prueba esto, es simple

 div { position: absolute; top: -20px; transition: top 1s; }
 <div>hello everyone!</div>

ahora cuando configuras style.top = "0px"; en tu código, obtendrás un efecto deslizante

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!