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

405
Views
Hacer que modal se desvanezca y desaparezca

Encontré este modal que estoy usando en Codepen https://codepen.io/benfrain/pen/wvayeWq y me pregunto cómo puedo hacer que el modal aparezca y desaparezca gradualmente en lugar de aparecer y desaparecer.

Gracias de antemano.

 var btn = document.getElementById("btn"); btn.addEventListener("click", e => { document.documentElement.setAttribute("data-modal-active", document.documentElement.getAttribute("data-modal-active") === "true" ? "false" : "true") }); aside { position: absolute; z-index: 100; background-color: #777; top: 50%; left: 50%; overflow: auto; max-height: 80vh; transform: translate(-50%, -50%); display: none; flex-direction: column; [data-modal-active="true"] & { display: flex; } }
about 4 years ago · Santiago Gelvez
1 answers
Answer question

0

Lo entiendo ahora, lo siento, no noté el cambio en el valor primero. Muchas gracias por la ayuda.

CSS

 aside { position: absolute; z-index: 100; background-color: #777; top: 50%; left: 50%; overflow: auto; max-height: 80vh; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); visibility: hidden; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; opacity: 0; -webkit-transition: visibility 0.5s, opacity 0.5s linear; transition: visibility 0.5s, opacity 0.5s;
about 4 years ago · Santiago Gelvez 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!