Glitch Slice
Two color-shifted clones slice through in staggered horizontal bands, simulating a signal glitch.
Glitch Slice the 3rd of 21 designs in the 21 CSS Button Hover Effects collection. The design is implemented in pure CSS — no JavaScript required. Copy the HTML and CSS panels below into your project. Because the demo is pure CSS, it works in any framework or templating engine you happen to use. The design honours prefers-reduced-motion and uses real semantic markup, so it ships accessibility-ready out of the box.
Live preview
The code
<button class="bhe-03__btn" data-text="GLITCH">GLITCH</button>
.bhe-03__btn {
padding: 12px 32px;
font-size: 13.5px;
font-family: inherit;
font-weight: 500;
border-radius: 8px;
cursor: pointer;
letter-spacing: 0.02em;
background: transparent;
color: inherit;
}
.bhe-03__btn {
position: relative;
overflow: hidden;
}
.bhe-03__btn::before,
.bhe-03__btn::after {
content: attr(data-text);
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
}
.bhe-03__btn::before {
background: #ff6c8a;
color: #fff;
clip-path: polygon(0 30%, 100% 30%, 100% 50%, 0 50%);
}
.bhe-03__btn::after {
background: #7c6cff;
color: #fff;
clip-path: polygon(0 55%, 100% 55%, 100% 75%, 0 75%);
}
.bhe-03__btn:hover::before {
animation: glitch1 0.3s steps(1) infinite;
}
.bhe-03__btn:hover::after {
animation: glitch2 0.3s steps(1) infinite 0.05s;
}
@keyframes glitch1 {
50% {
opacity: 1;
transform: translateX(-4px);
}
}
@keyframes glitch2 {
50% {
opacity: 1;
transform: translateX(4px);
}
}
@media (prefers-reduced-motion: reduce) {
.bhe-03__btn,
.bhe-03__btn * {
animation: none !important;
}
}