A worked example, rendered from real sample data. Sign in to run the tool on your own input.
typewriter.text-fx {
display: inline-block;
overflow: hidden;
white-space: nowrap;
border-right: 3px solid #3b82f6;
width: 0;
animation: text-typing 2500ms steps(11, end) 0ms forwards, text-caret 0.7s step-end infinite;
}
@keyframes text-typing { to { width: 100%; } }
@keyframes text-caret { 50% { border-color: transparent; } }
@media (prefers-reduced-motion: reduce) {
.text-fx, .text-fx span, .text-fx::before, .text-fx::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}
/* HTML: <span class="text-fx" data-text="Hello world">Hello world</span> */
Generate typewriter, fade-in, bounce, and other text animations. Part of the DevTools Surf developer suite. Browse more tools in the Animation / CSS collection.