Diagonal Shutter
A skewed gradient panel wipes diagonally across the button like a camera shutter opening.
Diagonal Shutter the 6th 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-06__btn">Hover Me</button>
.bhe-06__btn {
padding: 12px 32px;
font-size: 13.5px;
font-family: inherit;
font-weight: 500;
border-radius: 8px;
cursor: pointer;
letter-spacing: 0.02em;
color: inherit;
background: transparent;
}
.bhe-06__btn {
position: relative;
overflow: hidden;
z-index: 0;
border: 1px solid rgba(255, 255, 255, 0.18);
transition:
color 0.3s,
border-color 0.3s;
}
.bhe-06__btn::before {
content: "";
position: absolute;
top: 0;
left: -105%;
width: 100%;
height: 100%;
background: linear-gradient(135deg, #7c6cff 0%, #ff6c8a 100%);
transition: left 0.4s cubic-bezier(0.23, 1, 0.32, 1);
z-index: -1;
transform: skewX(-15deg);
}
.bhe-06__btn:hover::before {
left: 0;
}
.bhe-06__btn:hover {
border-color: transparent;
}