27 CSS Card Hover Effects

Slide Up Content

Extra description and a CTA animate into view from below the title on hover using max-height and translateY.

Pure CSS MIT licensed

Slide Up Content the 12th of 27 designs in the 27 CSS Card 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

Open in playground

The code

<div class="card-12">
  <div class="card-12__image"><span class="card-12__icon">🎨</span></div>
  <div class="card-12__body">
    <h4 class="card-12__title">Slide Up</h4>
    <div class="card-12__hidden">
      Extra details slide up on hover.
      <span class="card-12__cta">Read more &rarr;</span>
    </div>
  </div>
</div>
/* Demo 12 has its own typography scale — don't include the shared rules. */
.card-12 {
  width: 100%;
  max-width: 280px;
  border-radius: 14px;
  overflow: hidden;
  background: #17171f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition:
    box-shadow 0.35s,
    transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}
.card-12:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.42);
}
.card-12__image {
  height: 90px;
  background: linear-gradient(135deg, #1a1a2e, #0d0d2b);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}
.card-12:hover .card-12__image {
  transform: scale(1.05);
}
.card-12__body {
  padding: 16px 18px;
}
.card-12__title {
  font-size: 14px;
  font-weight: 600;
  color: #f0eeff;
  margin-bottom: 4px;
}
.card-12__hidden {
  font-size: 12px;
  color: #b8b6d4;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(8px);
  transition:
    max-height 0.4s ease,
    opacity 0.35s ease,
    transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}
.card-12:hover .card-12__hidden {
  max-height: 60px;
  opacity: 1;
  transform: translateY(0);
}
.card-12__cta {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  color: #7c6cff;
  font-weight: 600;
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.3s 0.12s,
    transform 0.3s 0.12s;
}
.card-12:hover .card-12__cta {
  opacity: 1;
  transform: translateY(0);
}

Search CodeFronts

Loading…