27 CSS Button Hover Effects 20 / 27
Ripple Wave
A ripple circle radiates outward from the exact point of your click, like Material Design.
The code
<button class="bhe-20__btn">Click Me</button>
<button class="bhe-20__btn">Click Me</button>.bhe-20__btn {
padding: 12px 32px;
font-size: 13.5px;
font-family: inherit;
font-weight: 500;
cursor: pointer;
letter-spacing: 0.02em;
color: inherit;
background: transparent;
}
.bhe-20__btn {
position: relative;
overflow: hidden;
}
.bhe-20__ripple {
position: absolute;
border-radius: 50%;
background: rgba(255, 255, 255, 0.32);
transform: scale(0);
animation: rwave 0.7s linear;
pointer-events: none;
}
@keyframes rwave {
to {
transform: scale(4);
opacity: 0;
}
}
@media (prefers-reduced-motion: reduce) {
.bhe-20__btn,
.bhe-20__btn * {
animation: none !important;
}
}
.bhe-20__btn {
padding: 12px 32px;
font-size: 13.5px;
font-family: inherit;
font-weight: 500;
cursor: pointer;
letter-spacing: 0.02em;
color: inherit;
background: transparent;
}
.bhe-20__btn {
position: relative;
overflow: hidden;
}
.bhe-20__ripple {
position: absolute;
border-radius: 50%;
background: rgba(255, 255, 255, 0.32);
transform: scale(0);
animation: rwave 0.7s linear;
pointer-events: none;
}
@keyframes rwave {
to {
transform: scale(4);
opacity: 0;
}
}
@media (prefers-reduced-motion: reduce) {
.bhe-20__btn,
.bhe-20__btn * {
animation: none !important;
}
}
document.querySelectorAll(".bhe-20__btn").forEach(function (btn) {
btn.addEventListener("click", function (e) {
const c = document.createElement("span");
const d = Math.max(btn.offsetWidth, btn.offsetHeight);
const r = btn.getBoundingClientRect();
c.className = "bhe-20__ripple";
c.style.cssText =
"width:" + d + "px;height:" + d + "px;" +
"left:" + (e.clientX - r.left - d / 2) + "px;" +
"top:" + (e.clientY - r.top - d / 2) + "px";
btn.appendChild(c);
c.addEventListener("animationend", function () { c.remove(); });
});
}); document.querySelectorAll(".bhe-20__btn").forEach(function (btn) {
btn.addEventListener("click", function (e) {
const c = document.createElement("span");
const d = Math.max(btn.offsetWidth, btn.offsetHeight);
const r = btn.getBoundingClientRect();
c.className = "bhe-20__ripple";
c.style.cssText =
"width:" + d + "px;height:" + d + "px;" +
"left:" + (e.clientX - r.left - d / 2) + "px;" +
"top:" + (e.clientY - r.top - d / 2) + "px";
btn.appendChild(c);
c.addEventListener("animationend", function () { c.remove(); });
});
});More from 27 CSS Button Hover Effects
Modern 3D Skeuomorphic Button Press EffectsNeo-Brutalist & Cyberpunk Button Glow EffectsSliding Background Color Wipe Button EffectsLiquid Fill & Organic Morphing Button EffectsKinetic Text Flip & Icon Reveal Button EffectsLiquid FillMagnetic BorderGlitch SliceNeon PulseSplit RevealDiagonal ShutterElastic Lift
View the full collection →