Template:Text Shuffle/styles.css: Difference between revisions
Template page
More actions
Content deleted Content added
No edit summary |
No edit summary |
||
| Line 2: | Line 2: | ||
.TextShuffler { |
.TextShuffler { |
||
position: relative; |
|||
font-size: 2rem; |
font-size: 2rem; |
||
letter-spacing: 2px; |
letter-spacing: 2px; |
||
overflow: hidden; |
|||
height: |
height: 1.2em; |
||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; |
|||
} |
} |
||
.word { |
|||
position: absolute; |
|||
top: 0; |
|||
left: 0; |
|||
opacity: 0; |
opacity: 0; |
||
visibility: hidden; |
|||
animation: |
animation: fadeWord 6s linear infinite; |
||
} |
} |
||
.word:nth-child(1) { animation-delay: 0s; } |
|||
.word:nth-child(2) { animation-delay: 1s; } |
|||
.word:nth-child(3) { animation-delay: 2s; } |
|||
.word:nth-child(4) { animation-delay: 3s; } |
|||
.word:nth-child(5) { animation-delay: 4s; } |
|||
.word:nth-child(6) { animation-delay: 5s; } |
|||
@keyframes |
@keyframes fadeWord { |
||
0% { opacity: 0; transform: translateY(0. |
0% { opacity: 0; visibility: hidden; transform: translateY(0.4em); } |
||
5% { opacity: 1; visibility: visible; transform: translateY(0); } |
|||
20% { opacity: 1; visibility: visible; } |
|||
25% { opacity: 0; visibility: hidden; transform: translateY(-0.4em); } |
|||
100% { opacity: 0; } |
100% { opacity: 0; visibility: hidden; } |
||
} |
} |
||
Revision as of 16:15, April 18, 2025
/* assembling piece by piece rn */
.TextShuffler {
font-size: 2rem;
letter-spacing: 2px;
overflow: hidden;
height: 1.2em;
display: flex;
flex-direction: column;
align-items: center;
}
.word {
opacity: 0;
visibility: hidden;
animation: fadeWord 6s linear infinite;
}
.word:nth-child(1) { animation-delay: 0s; }
.word:nth-child(2) { animation-delay: 1s; }
.word:nth-child(3) { animation-delay: 2s; }
.word:nth-child(4) { animation-delay: 3s; }
.word:nth-child(5) { animation-delay: 4s; }
.word:nth-child(6) { animation-delay: 5s; }
@keyframes fadeWord {
0% { opacity: 0; visibility: hidden; transform: translateY(0.4em); }
5% { opacity: 1; visibility: visible; transform: translateY(0); }
20% { opacity: 1; visibility: visible; }
25% { opacity: 0; visibility: hidden; transform: translateY(-0.4em); }
100% { opacity: 0; visibility: hidden; }
}