Back to CSS Card Hover Effects Frosted Glass Intensify Pure CSS
Share
HTML
<div class="card-21">
  <div class="card-21__bg"></div>
  <div class="card-21__frost"></div>
  <div class="card-21__content">
    <span class="card-21__tag">Glass</span>
    <h4 class="card-21__title">Frosted Glass</h4>
    <p class="card-21__body">Backdrop blur intensifies on hover.</p>
  </div>
</div>
CSS
.card-21__tag {
  font-family: monospace;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(124, 108, 255, 0.15);
  color: #7c6cff;
  border: 1px solid rgba(124, 108, 255, 0.3);
  display: inline-block;
  margin-bottom: 10px;
}
.card-21__title {
  font-size: 17px;
  font-weight: 700;
  color: #f0eeff;
  margin-bottom: 6px;
}
.card-21__body {
  font-size: 13px;
  color: #b8b6d4;
  line-height: 1.6;
}
.card-21 {
  width: 100%;
  max-width: 280px;
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  min-height: 130px;
  transition:
    border-color 0.4s,
    box-shadow 0.4s;
}
.card-21:hover {
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}
.card-21__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(135deg, #1a0533, #0a1535, #0d2b1a);
}
.card-21__bg::before {
  content: "";
  position: absolute;
  border-radius: 50%;
  width: 120px;
  height: 120px;
  background: rgba(124, 108, 255, 0.55);
  top: -20px;
  right: -20px;
  filter: blur(40px);
}
.card-21__bg::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  width: 100px;
  height: 100px;
  background: rgba(61, 232, 245, 0.4);
  bottom: -10px;
  left: 0;
  filter: blur(40px);
}
.card-21__frost {
  position: absolute;
  inset: 0;
  z-index: 1;
  backdrop-filter: blur(0px) saturate(100%);
  -webkit-backdrop-filter: blur(0px) saturate(100%);
  transition:
    backdrop-filter 0.5s ease,
    -webkit-backdrop-filter 0.5s ease;
}
.card-21:hover .card-21__frost {
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
}
.card-21__content {
  position: relative;
  z-index: 2;
}