A single line splits into an X, closes again standing upright, then splits and lies back down. Two bars rotate in opposite directions with ease-in-out, pausing whenever they overlap.
Also known as: scissor loader, x spinner, split line loader.
<div class="ldr-crossing-lines" role="status" aria-label="Loading"> <span></span><span></span> </div>
.ldr-crossing-lines {
--s: var(--ldr-size, 48px);
--c: var(--ldr-color, #3b82f6);
position: relative;
width: var(--s);
height: var(--s);
}
.ldr-crossing-lines span {
position: absolute;
top: calc(50% - var(--s) / 18);
left: 0;
width: 100%;
height: calc(var(--s) / 9);
border-radius: var(--s);
background: color-mix(in srgb, var(--ldr-color, #3b82f6) 45%, transparent);
animation: ldr-crossing-lines-b 1.8s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}
.ldr-crossing-lines span:first-child {
z-index: 1;
background: var(--c);
animation-name: ldr-crossing-lines-a;
}
@keyframes ldr-crossing-lines-a {
0% { transform: rotate(0deg); }
50% { transform: rotate(90deg); }
100% { transform: rotate(180deg); }
}
@keyframes ldr-crossing-lines-b {
0% { transform: rotate(0deg); }
50% { transform: rotate(-90deg); }
100% { transform: rotate(-180deg); }
}
@media (prefers-reduced-motion: reduce) {
.ldr-crossing-lines, .ldr-crossing-lines *, .ldr-crossing-lines::before, .ldr-crossing-lines::after, .ldr-crossing-lines *::before, .ldr-crossing-lines *::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.