Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
You must create an account or log in to edit.

Template:Text Shuffle/styles.css: Difference between revisions

Template page
Content deleted Content added
MMONTAGEe (talk | contribs)
No edit summary
Tag: Manual revert
MMONTAGEe (talk | contribs)
No edit summary
Line 3: Line 3:


.TextShuffler {
.TextShuffler {
font-size: 2rem;
font-size: 1.5em;
letter-spacing: 2px;
display: grid;
width: 10ch;
place-items: center;
height: 2.5em;
height: 1.2em;
overflow: hidden;
}
}


.TextShuffler .word {
.TextShuffler .word {
position: absolute;
top: 0;
left: 0;
opacity: 0;
opacity: 0;
visibility: hidden;
animation: fadeInOut 24s infinite;
animation: fadeWord 8s linear infinite;
}
}


.TextShuffler .word:nth-child(1) { animation-delay: 0s; }
.TextShuffler .word:nth-child(1) { animation-delay: 0s; }
.TextShuffler .word:nth-child(2) { animation-delay: 4s; }
.TextShuffler .word:nth-child(2) { animation-delay: 2s; }
.TextShuffler .word:nth-child(3) { animation-delay: 8s; }
.TextShuffler .word:nth-child(3) { animation-delay: 4s; }
.TextShuffler .word:nth-child(4) { animation-delay: 12s; }
.TextShuffler .word:nth-child(4) { animation-delay: 6s; }
.TextShuffler .word:nth-child(5) { animation-delay: 16s; }
.TextShuffler .word:nth-child(5) { animation-delay: 8s; }
.TextShuffler .word:nth-child(6) { animation-delay: 20s; }
.TextShuffler .word:nth-child(6) { animation-delay: 10s; }


@keyframes fadeInOut {
@keyframes fadeWord {
0% { opacity: 0; transform: translateY(0.2em); }
0% { opacity: 0; visibility: hidden; transform: translateY(0.5em); }
10% { opacity: 1; transform: translateY(0); }
5% { opacity: 1; visibility: visible; transform: translateY(0); }
25% { opacity: 1; }
20% { opacity: 1; }
35% { opacity: 0; transform: translateY(-0.2em); }
25% { opacity: 0; visibility: hidden; transform: translateY(-0.5em); }
100% { opacity: 0; }
100% { opacity: 0; visibility: hidden; }
}
}

Revision as of 16:58, April 18, 2025

/* assembling piece by piece rn */


.TextShuffler {
  font-size: 1.5em;
  display: grid;
  place-items: center;
  height: 1.2em;
  overflow: hidden;
}

.TextShuffler .word {
  opacity: 0;
  visibility: hidden;
  animation: fadeWord 8s linear infinite;
}

.TextShuffler .word:nth-child(1) { animation-delay: 0s; }
.TextShuffler .word:nth-child(2) { animation-delay: 2s; }
.TextShuffler .word:nth-child(3) { animation-delay: 4s; }
.TextShuffler .word:nth-child(4) { animation-delay: 6s; }
.TextShuffler .word:nth-child(5) { animation-delay: 8s; }
.TextShuffler .word:nth-child(6) { animation-delay: 10s; }

@keyframes fadeWord {
  0%   { opacity: 0; visibility: hidden; transform: translateY(0.5em); }
  5%   { opacity: 1; visibility: visible; transform: translateY(0); }
  20%  { opacity: 1; }
  25%  { opacity: 0; visibility: hidden; transform: translateY(-0.5em); }
  100% { opacity: 0; visibility: hidden; }
}