HoverLab

Holographic Cyber Glitch

Cyber chromatic RGB split with cyan/magenta glow and CRT scanlines.

Live demo

Hover the buttons to see the effect.

Customize in HoverLab → ☕ Buy me a coffee

How to use this effect

Paste the HTML into your page and the CSS into your stylesheet. Change --btn-color, --btn-bg and --anim-speed to match your design.

HTML
<button class="hover-btn btn-size-md btn-hover-holographic-glitch">
  <span>HoverLab</span>
  <svg class="btn-icon btn-icon-right" width="18" height="18" viewBox="0 0 256 256" fill="currentColor"><path d="M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z"></path></svg>
</button>
CSS
/* ==========================================
   HoverLab Effect #25: 25. Holographic Cyber Glitch
   Self-Contained & Plug-and-Play CSS
   ========================================== */

:root {
  --btn-color: #e6332a;
  --btn-bg: #eeeeee;
  --anim-speed: 0.35s;
}

/* Base Button Styles */
.hover-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 28px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  background-color: transparent;
  color: var(--btn-color, #e6332a);
  border: 1.5px solid var(--btn-color, #e6332a);
  border-radius: 9999px;
  text-decoration: none;
  user-select: none;
  transition: all var(--anim-speed, 0.35s) cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.hover-btn.btn-icon-only {
  padding: 0 !important;
  aspect-ratio: 1 / 1;
  width: 44px;
  height: 44px;
}

.hover-btn .btn-icon {
  display: block;
  flex-shrink: 0;
  transition: transform var(--anim-speed, 0.35s) cubic-bezier(0.16, 1, 0.3, 1);
}

/* Effect Styles */
@keyframes cyberChromaticJitter {
  0% {
    transform: translateX(0);
    text-shadow: -2px 0 #00ffff, 2px 0 #ff0055;
  }
  15% {
    transform: translateX(-2px) skewX(-2deg);
    text-shadow: 3px -1px #00ffff, -3px 1px #ff0055;
  }
  30% {
    transform: translateX(2px) skewX(2deg);
    text-shadow: -3px 1px #00ffff, 3px -1px #ff0055;
  }
  45% {
    transform: translateX(-1px);
    text-shadow: 2px 0 #00ffff, -2px 0 #ff0055;
  }
  60% {
    transform: translateX(1px);
    text-shadow: -1.5px 0 #00ffff, 1.5px 0 #ff0055;
  }
  75% {
    transform: translateX(0);
    text-shadow: 1px 0 #00ffff, -1px 0 #ff0055;
  }
  100% {
    transform: translateX(0);
    text-shadow: -1px 0 #00ffff, 1px 0 #ff0055;
  }
}

.btn-hover-holographic-glitch {
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: transform var(--anim-speed, 0.3s) cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow var(--anim-speed, 0.3s) ease,
              border-color var(--anim-speed, 0.3s) ease,
              color var(--anim-speed, 0.3s) ease,
              background-color var(--anim-speed, 0.3s) ease;
}

.btn-hover-holographic-glitch::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -100%;
  width: 60%;
  height: 200%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 255, 255, 0.35) 40%,
    rgba(255, 0, 128, 0.4) 50%,
    rgba(0, 255, 255, 0.35) 60%,
    transparent 100%
  );
  transform: rotate(25deg);
  transition: transform 0s ease;
  pointer-events: none;
  z-index: -1;
}

.btn-hover-holographic-glitch::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 255, 255, 0.05) 0px,
    rgba(0, 255, 255, 0.05) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: 0;
  transition: opacity var(--anim-speed, 0.3s) ease;
  pointer-events: none;
  z-index: -1;
}

.btn-hover-holographic-glitch:hover::before {
  transform: translateX(450%) rotate(25deg);
  transition: transform var(--anim-speed, 0.7s) cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-hover-holographic-glitch:hover::after {
  opacity: 1;
}

.btn-hover-holographic-glitch:hover {
  border-color: #00ffff !important;
  color: #00ffff !important;
  background-color: rgba(0, 255, 255, 0.08);
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.4),
              0 0 45px rgba(255, 0, 128, 0.25);
}

.btn-hover-holographic-glitch:active {
  transform: translateY(0);
}

.btn-hover-holographic-glitch span,
.btn-hover-holographic-glitch .btn-icon {
  display: inline-flex;
  align-items: center;
  position: relative;
  z-index: 2;
  transition: transform var(--anim-speed, 0.3s) ease, text-shadow var(--anim-speed, 0.3s) ease;
}

.btn-hover-holographic-glitch:hover span,
.btn-hover-holographic-glitch:hover .btn-icon {
  animation: cyberChromaticJitter 0.45s ease-out;
}

When to use it

Special effects add light, particles or texture. They catch the eye, so reserve them for one highlight per screen: a launch button, a pricing CTA or a creative portfolio link.

Accessibility

Use a real <button> or <a> element so the effect also works with the keyboard: duplicate the :hover selectors with :focus-visible. For visitors who prefer less motion, wrap the transitions and animations in @media (prefers-reduced-motion: no-preference).

Browser support

The effect relies on standard CSS (transitions, transforms, pseudo-elements and custom properties). It works in current versions of Chrome, Edge, Firefox and Safari, with no JavaScript and no dependency.

More Special FX & Particles effects