dobutterfliescry.net/www/typing.css

78 lines
1.3 KiB
CSS
Raw Normal View History

html, body {
height: 100%;
margin: 0;
2025-07-28 10:58:18 +10:00
background-color: #0e0d14;
}
.centered {
position: absolute;
inset: 0 0 0 0;
margin: auto;
display: flex;
justify-content: center;
align-content: center;
align-items: center;
}
2025-07-28 10:58:18 +10:00
.heading {
font-family: monospace;
font-size: 2em;
font-weight: bold;
color: #ac4aed;
}
/* =========================================================== *
* Type Writer Effect *
/* =========================================================== */
.typing-wrapper {
/* display: flex; */
/* flex-direction: column; */
/* text-align: center; */
/* justify-items: flex-start; */
/* align-items: center; */
width: 39ch; /* length of typing-prompt + cursor */
border: 3px solid #ac4aed;
padding: 20px;
2025-07-28 10:58:18 +10:00
}
.typing-prompt {
display: inline-block;
text-align: start;
2025-07-28 10:58:18 +10:00
}
.typing-effect {
2025-07-28 10:58:18 +10:00
width: 36ch;
animation: typing 3s steps(36), cursor-blink 1s step-end 3s infinite alternate;
2025-07-28 10:58:18 +10:00
white-space: nowrap;
overflow: hidden;
border-right: 1ch solid;
}
.typing-result {
animation: unhide 1s 3.8s forwards;
visibility: hidden;
}
2025-07-28 10:58:18 +10:00
@keyframes typing {
from {
width: 0
}
}
@keyframes cursor-blink {
2025-07-28 10:58:18 +10:00
50% {
border-color: transparent
}
}
@keyframes unhide {
to {
visibility: visible
}
}