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

185
Views
Fundido en caracteres en css con un bucle

así que quiero desvanecerme letra por letra usando solo css.

 :root { --delay: 1; } #welcomemsg span { visibility: hidden; } #welcomemsg span:nth-of-type(n+1) { animation: type 0s ease-in var(--delay)s; animation-fill-mode: forwards; --delay: calc(var(--delay) + 1); } @keyframes type { to { visibility: unset; } }
 <div id="welcomemsg"> <span>H</span><span>e</span><span>y</span><span>!</span> </div>

Investigué un poco y descubrí que esto no podía funcionar porque la demora estaría dentro de un bucle, por lo que la demora :nth-of-type(1) sería infinita. ¿Hay alguna manera de hacer que esto funcione sin hacer todos los enésimos tipos a mano? Sería genial hacer esto sin crear un lío de css.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Aquí tienes...

 #welcomemsg { color: red; font-family: "Courier"; font-size: 20px; margin: 10px 0 0 10px; white-space: nowrap; overflow: hidden; width: 30em; animation: type 20s steps(50, end); } @keyframes type { from { width: 0; } }
 <div id="welcomemsg"> <span>H</span><span>e</span><span>y</span><span>!</span> </div>

ACTUALIZAR

 span { font-size: 30px; opacity: 0; } span:nth-child(1) { animation: type 1s forwards 0s; } span:nth-child(2) { animation: type 1s forwards 0.5s; } span:nth-child(3) { animation: type 1s forwards 1s; } span:nth-child(4) { animation: type 1s forwards 1.5s; } @keyframes type { 0% { opacity: 0; } 100% { opacity: 1; } }
 <div id="welcomemsg"> <span>H</span><span>e</span><span>y</span><span>!</span> </div>

over 4 years ago · Santiago Trujillo 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!