Letters drift up and curl away as soft smoke one after another, then condense back out of the haze into sharp type. Each letter animates blur, skew and a rising curl on a staggered delay.
Also known as: smoke animation css, smoke text effect css, text vanish into smoke, disappearing text smoke.
<div class="txt-smoke-dissolve-text"><span style="--i: 0">V</span><span style="--i: 1">a</span><span style="--i: 2">n</span><span style="--i: 3">i</span><span style="--i: 4">s</span><span style="--i: 5">h</span><span style="--i: 6">i</span><span style="--i: 7">n</span><span style="--i: 8">g</span></div>
.txt-smoke-dissolve-text {
--c: var(--txt-color, #3b82f6);
font-size: calc(var(--txt-size, 32px) * 1.6);
font-family: system-ui, sans-serif;
font-weight: 700;
line-height: 1.2;
white-space: nowrap;
letter-spacing: 0.01em;
color: color-mix(in srgb, var(--c) 30%, currentColor);}
.txt-smoke-dissolve-text span {
display: inline-block;
animation: txt-smoke-dissolve-text-drift 6s cubic-bezier(0.45, 0.05, 0.35, 1) calc(var(--i) * 0.08s) infinite;
}
@keyframes txt-smoke-dissolve-text-drift {
0%, 54%, 86%, 100% { opacity: 1; filter: blur(0); transform: none; }
68% {
opacity: 0;
filter: blur(0.16em);
transform: translate(0.3em, -0.7em) rotate(calc((var(--i) - 4) * 4deg)) skewX(-16deg) scale(1.4);
}
68.1%, 72% { opacity: 0; filter: blur(0.18em); transform: translate(-0.15em, 0.2em) scale(1.25); }
}
@media (prefers-reduced-motion: reduce) {
.txt-smoke-dissolve-text span { animation: none; }
}
@media (prefers-reduced-motion: reduce) {
.txt-smoke-dissolve-text, .txt-smoke-dissolve-text *, .txt-smoke-dissolve-text::before, .txt-smoke-dissolve-text::after, .txt-smoke-dissolve-text *::before, .txt-smoke-dissolve-text *::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}--txt-color on the element or a parent.
Currently previewing #3b82f6.--txt-size. Every other dimension is in
em, so the whole thing scales together. Currently previewing 40px.transition or animation
shorthand. Staggered delays are relative, so they keep their rhythm.