Typography · 26 of 33
Neon Flicker
Realistic neon sign flicker animation
<h2 class="neon-text">OPEN 24/7</h2>
.neon-text {
font-size: 3.5rem;
font-weight: 600;
text-align: center;
color: #fff;
text-shadow: 0 0 5px #fff, 0 0 10px #fff,
0 0 20px #7c5cff, 0 0 30px #7c5cff, 0 0 40px #7c5cff;
animation: neon-flicker 3s infinite;
}
@keyframes neon-flicker {
0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
opacity: 1;
text-shadow: 0 0 5px #fff, 0 0 10px #fff,
0 0 20px #7c5cff, 0 0 30px #7c5cff, 0 0 40px #7c5cff;
}
20%, 24%, 55% {
opacity: 0.5;
text-shadow: none;
}
}