An old tube screen powers on from a dot to a line to a glowing picture with rolling scanlines, then collapses back to a line and a dot. The classic CRT switch-off, looped, in a single scaled element.
Also known as: old tv turn off animation, crt power off effect, retro tv loader.
<div class="ldr-crt-screen" role="status" aria-label="Loading"><span></span></div>
.ldr-crt-screen {
--s: var(--ldr-size, 48px);
--c: var(--ldr-color, #3b82f6);
box-sizing: border-box;
width: calc(var(--s) * 1.5);
height: calc(var(--s) * 1.14);
padding: calc(var(--s) * 0.08);
border: calc(var(--s) / 18) solid color-mix(in srgb, var(--ldr-color, #3b82f6) 45%, transparent);
border-radius: calc(var(--s) * 0.18);
background: color-mix(in srgb, var(--ldr-color, #3b82f6) 8%, transparent);
}
.ldr-crt-screen span {
display: block;
width: 100%;
height: 100%;
border-radius: calc(var(--s) * 0.1);
background:
repeating-linear-gradient(transparent 0 calc(var(--s) / 40), color-mix(in srgb, var(--ldr-color, #3b82f6) 30%, transparent) 0 calc(var(--s) / 20)),
radial-gradient(ellipse at 50% 45%, color-mix(in srgb, var(--c) 45%, #fff), var(--c) 75%);
box-shadow: 0 0 calc(var(--s) / 5) color-mix(in srgb, var(--ldr-color, #3b82f6) 55%, transparent);
animation: ldr-crt-screen-power 3s infinite, ldr-crt-screen-roll 0.8s linear infinite;
}
@keyframes ldr-crt-screen-power {
0% { transform: scale(0, 0); opacity: 0; animation-timing-function: ease-out; }
6% { transform: scale(0.05, 0.06); opacity: 1; animation-timing-function: cubic-bezier(0.7, 0, 0.3, 1); }
14% { transform: scale(1, 0.04); animation-timing-function: cubic-bezier(0.2, 0.9, 0.3, 1.1); }
22%, 70% { transform: scale(1, 1); animation-timing-function: cubic-bezier(0.7, 0, 0.9, 0.4); }
77% { transform: scale(1, 0.04); animation-timing-function: cubic-bezier(0.7, 0, 0.3, 1); }
85% { transform: scale(0.05, 0.06); opacity: 1; animation-timing-function: ease-in; }
92%, 100% { transform: scale(0, 0); opacity: 0; }
}
@keyframes ldr-crt-screen-roll {
from { background-position: 0 0, 0 0; }
to { background-position: 0 calc(var(--s) / 20), 0 0; }
}
@media (prefers-reduced-motion: reduce) {
.ldr-crt-screen, .ldr-crt-screen *, .ldr-crt-screen::before, .ldr-crt-screen::after, .ldr-crt-screen *::before, .ldr-crt-screen *::after {
animation-duration: 3s;
}
}--ldr-color on the element or a parent.
Currently previewing #3b82f6.--ldr-size. Every dimension in the snippet is
derived from it. Currently previewing 64px.animation shorthand.
Delays on the children are relative, so they keep their rhythm.role="status" and an
aria-label so screen readers announce the wait. The reduced-motion rule
at the end slows the animation for users who asked for less motion.