AI CSS Animations

Neon Sign Turn On Effect

Every letter starts as a dead glass tube and stutters to life on its own schedule, then the sign stays lit. Plays once; per-letter delays sit inline so the stutter never looks mechanical.

Also known as: neon light turning on, neon power on animation, neon sign flicker on.

NOW OPEN

HTML

<div class="txt-neon-sign-turn-on" aria-label="NOW OPEN"><span style="--i: 0; --d: 0.35s">N</span><span style="--i: 1; --d: 0.1s">O</span><span style="--i: 2; --d: 0.5s">W</span><span style="--i: 3; --d: 0s">&nbsp;</span><span style="--i: 4; --d: 0.2s">O</span><span style="--i: 5; --d: 0.6s">P</span><span style="--i: 6; --d: 0.05s">E</span><span style="--i: 7; --d: 0.4s">N</span></div>

CSS

.txt-neon-sign-turn-on {
  --c: var(--txt-color, #3b82f6);
  font-size: var(--txt-size, 32px);
  font-family: system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.1em;
  color: color-mix(in srgb, var(--c) 28%, transparent);}
.txt-neon-sign-turn-on span {
  animation: txt-neon-sign-turn-on-strike 1.2s steps(1, end) var(--d) forwards;
}
@keyframes txt-neon-sign-turn-on-strike {
  0%, 12%, 33%, 42% { color: color-mix(in srgb, var(--c) 28%, transparent); text-shadow: none; }
  8%, 30%, 38%, 50%, 100% {
    color: color-mix(in srgb, var(--c) 30%, #fff);
    text-shadow: 0 0 0.01em var(--c), 0 0 0.03em var(--c), 0 0 0.1em var(--c), 0 0 0.3em color-mix(in srgb, var(--c) 70%, transparent), 0 0 0.6em color-mix(in srgb, var(--c) 40%, transparent);
  }
}

@media (prefers-reduced-motion: reduce) {
  .txt-neon-sign-turn-on, .txt-neon-sign-turn-on *, .txt-neon-sign-turn-on::before, .txt-neon-sign-turn-on::after, .txt-neon-sign-turn-on *::before, .txt-neon-sign-turn-on *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

Customizing this snippet

  • Color: set --txt-color on the element or a parent. Currently previewing #3b82f6.
  • Font size: set --txt-size. Every other dimension is in em, so the whole thing scales together. Currently previewing 40px.
  • Speed: change the duration on the transition or animation shorthand. Staggered delays are relative, so they keep their rhythm.
  • Reduced motion: the rule at the end of the CSS turns the motion off for people who asked their OS for less of it. Keep it.

Similar text animations