AI CSS Animations

Hologram Loader

A wireframe globe spins in a cone of light above a projector, with scanlines rolling through it and the odd glitch. Meridians are ellipses squeezed with scaleX, so there is no 3D transform at all.

Also known as: hologram projector animation, sci-fi globe loader, holographic globe.

HTML

<div class="ldr-hologram" role="status" aria-label="Loading"><span class="ldr-hologram-globe"></span></div>

CSS

.ldr-hologram {
  --s: var(--ldr-size, 48px);
  --c: var(--ldr-color, #3b82f6);
  position: relative;
  width: calc(var(--s) * 1.2);
  height: calc(var(--s) * 1.3);
}
.ldr-hologram::before {
  content: "";
  position: absolute;
  top: 10%;
  left: 0;
  right: 0;
  bottom: calc(var(--s) * 0.08);
  clip-path: polygon(0 0, 100% 0, 68% 100%, 32% 100%);
  background: linear-gradient(to top, color-mix(in srgb, var(--ldr-color, #3b82f6) 45%, transparent), transparent 90%);
  animation: ldr-hologram-flicker 3s steps(1, end) infinite;
}
.ldr-hologram::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: calc(var(--s) * 0.5);
  height: calc(var(--s) * 0.16);
  margin-left: calc(var(--s) * -0.25);
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 calc(var(--s) / 5) color-mix(in srgb, var(--ldr-color, #3b82f6) 60%, transparent);
}
.ldr-hologram-globe {
  --line: calc(var(--s) / 28);
  position: absolute;
  top: 0;
  left: 50%;
  box-sizing: border-box;
  width: calc(var(--s) * 0.74);
  height: calc(var(--s) * 0.74);
  margin-left: calc(var(--s) * -0.37);
  border: var(--line) solid var(--c);
  border-radius: 50%;
  background: linear-gradient(transparent calc(50% - var(--line) / 2), var(--c) 0 calc(50% + var(--line) / 2), transparent 0), color-mix(in srgb, var(--ldr-color, #3b82f6) 14%, transparent);
  -webkit-mask: repeating-linear-gradient(#000 0 calc(var(--s) / 40), rgba(0, 0, 0, 0.35) 0 calc(var(--s) / 20));
  mask: repeating-linear-gradient(#000 0 calc(var(--s) / 40), rgba(0, 0, 0, 0.35) 0 calc(var(--s) / 20));
  animation: ldr-hologram-glitch 3s steps(1, end) infinite, ldr-hologram-scan 1.2s linear infinite;
}
.ldr-hologram-globe::before,
.ldr-hologram-globe::after {
  content: "";
  position: absolute;
  inset: 0;
  border: var(--line) solid var(--c);
  border-radius: 50%;
  animation: ldr-hologram-spin 2.4s ease-in-out infinite;
}
.ldr-hologram-globe::after {
  animation-delay: -1.2s;
}
@keyframes ldr-hologram-spin {
  0%, 100% { transform: scaleX(1); }
  50%      { transform: scaleX(-1); }
}
@keyframes ldr-hologram-scan {
  from { -webkit-mask-position: 0 0; mask-position: 0 0; }
  to   { -webkit-mask-position: 0 calc(var(--s) / 20); mask-position: 0 calc(var(--s) / 20); }
}
@keyframes ldr-hologram-glitch {
  0%   { transform: none; opacity: 1; }
  60%  { transform: translateX(calc(var(--s) * 0.05)) skewX(-10deg); opacity: 0.6; }
  62%  { transform: translateX(calc(var(--s) * -0.03)); opacity: 1; }
  64%  { transform: none; }
  86%  { transform: translateX(calc(var(--s) * 0.02)); opacity: 0.75; }
  87%  { transform: none; opacity: 1; }
}
@keyframes ldr-hologram-flicker {
  0%  { opacity: 1; }
  60% { opacity: 0.45; }
  64% { opacity: 1; }
  86% { opacity: 0.7; }
  87% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .ldr-hologram, .ldr-hologram *, .ldr-hologram::before, .ldr-hologram::after, .ldr-hologram *::before, .ldr-hologram *::after {
    animation-duration: 3s;
  }
}

Customizing this loader

  • Color: set --ldr-color on the element or a parent. Currently previewing #3b82f6.
  • Size: set --ldr-size. Every dimension in the snippet is derived from it. Currently previewing 64px.
  • Speed: change the duration on the animation shorthand. Delays on the children are relative, so they keep their rhythm.
  • Accessibility: the root carries 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.

Similar loaders