CSSmediumCSS

Button Hover Effects Collection

Modern button hover effects with smooth transitions.

01

The problem

You need attractive hover effects for buttons to enhance user interaction.

02

The solution

CSS
/* Glow effect */
.btn-glow {
  background: linear-gradient(135deg, #3a7bff, #8b5cf6);
  color: white;
  padding: 12px 28px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-glow:hover {
  box-shadow: 0 0 20px rgba(58, 123, 255, 0.5),
              0 0 40px rgba(139, 92, 246, 0.3);
  transform: translateY(-2px);
}

/* Slide background */
.btn-slide {
  position: relative;
  background: transparent;
  color: #3a7bff;
  padding: 12px 28px;
  border: 2px solid #3a7bff;
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  transition: color 0.3s ease;
  z-index: 1;
}

.btn-slide::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: #3a7bff;
  transition: left 0.3s ease;
  z-index: -1;
}

.btn-slide:hover {
  color: white;
}

.btn-slide:hover::before {
  left: 0;
}

/* Ripple effect */
.btn-ripple {
  position: relative;
  background: #3a7bff;
  color: white;
  padding: 12px 28px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
}

.btn-ripple::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn-ripple:hover::after {
  width: 300px;
  height: 300px;
}

03

See it live

Isolated previewSandboxed
04

Put it to work

Example
<button class="btn-glow">Glow Effect</button>
<button class="btn-slide">Slide Effect</button>
<button class="btn-ripple">Ripple Effect</button>

Worth knowing

Combine with focus states for accessibility. Add :active states for click feedback.