The text collapses into a bright horizontal line, shrinks to a glowing dot and blinks out, then powers back on the same way, like an old tube TV. Scale transforms plus one pseudo-element line.
Also known as: tv turn off animation css, old tv switch off, crt shutdown effect.
<div class="txt-crt-power-off"><span class="txt-crt-power-off-text">GOOD NIGHT</span></div>
.txt-crt-power-off {
--c: var(--txt-color, #3b82f6);
font-size: var(--txt-size, 32px);
font-family: system-ui, sans-serif;
font-weight: 700;
line-height: 1.2;
position: relative;
display: inline-block;
letter-spacing: 0.08em;}
.txt-crt-power-off-text {
display: inline-block;
color: var(--c);
text-shadow: 0 0 0.25em color-mix(in srgb, var(--c) 55%, transparent);
animation: txt-crt-power-off-screen 4.2s cubic-bezier(0.6, 0, 0.4, 1) infinite;
}
/* the scan line the picture collapses into */
.txt-crt-power-off::after {
content: "";
position: absolute;
left: 0;
right: 0;
top: 50%;
height: 0.07em;
margin-top: -0.035em;
border-radius: 0.07em;
background: color-mix(in srgb, var(--c) 30%, #fff);
box-shadow: 0 0 0.1em var(--c), 0 0 0.35em var(--c);
opacity: 0;
animation: txt-crt-power-off-line 4.2s cubic-bezier(0.6, 0, 0.4, 1) infinite;
}
@keyframes txt-crt-power-off-screen {
0%, 44%, 96%, 100% { transform: scale(1, 1); opacity: 1; }
52%, 88% { transform: scale(1.04, 0.02); opacity: 0; }
}
@keyframes txt-crt-power-off-line {
0%, 44%, 96%, 100% { transform: scaleX(1); opacity: 0; }
50% { transform: scaleX(1); opacity: 1; }
58% { transform: scaleX(0.02); opacity: 1; }
64%, 80% { transform: scaleX(0); opacity: 0; }
84% { transform: scaleX(0.02); opacity: 1; }
90% { transform: scaleX(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
.txt-crt-power-off, .txt-crt-power-off *, .txt-crt-power-off::before, .txt-crt-power-off::after, .txt-crt-power-off *::before, .txt-crt-power-off *::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.