Back to CSS Button Hover Effects Diagonal Shutter Pure CSS
Share
HTML
<button class="bhe-06__btn">Hover Me</button>
CSS
.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;
}