33 CSS Card Hover Effects25 / 33

Pure CSSMIT licensed

Overlay Slide

A magazine card where a bold color panel slides up from the bottom to overtake the cover, swapping the teaser for full article details. A strong choice for editorial grids, issue archives, and publication or portfolio listings.

Published Updated

Live Demo
Try it

The code

<div class="card-25">
  <article class="card-25__card">
    <div class="card-25__base">
      <span class="card-25__base-cat">Editorial</span>
      <h2 class="card-25__base-title">Issue<br>No. 27</h2>
    </div>
    <div class="card-25__panel">
      <span class="card-25__panel-num">№ 27 — Spring</span>
      <h3 class="card-25__panel-title">The Red<br>Issue</h3>
      <p class="card-25__panel-desc">Forty pages on color, courage, and the people painting cities awake.</p>
      <span class="card-25__panel-link">Read the issue →</span>
    </div>
  </article>
</div>
@import url('https://fonts.googleapis.com/css2?family=Bodoni+Moda:opsz,wght@6..96,500;6..96,900&family=Work+Sans:wght@400;500&display=swap');

.card-25,
.card-25 *,
.card-25 *::before,
.card-25 *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.card-25 {
  width: 100%;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #f2f0eb;
  font-family: 'Work Sans', sans-serif;
  padding: 2rem;
}

.card-25__card {
  position: relative;
  width: 330px;
  height: 440px;
  border-radius: 2px;
  cursor: pointer;
  overflow: hidden;
  background: #1a1a1a;
  box-shadow: 0 18px 40px rgba(0,0,0,0.2);
}

.card-25__base {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.45)), linear-gradient(135deg, #6b7c8c, #2f3a44);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2.2rem;
  color: #fff;
}

.card-25__base-cat {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  opacity: 0.85;
}

.card-25__base-title {
  font-family: 'Bodoni Moda', serif;
  font-weight: 900;
  font-size: 2.4rem;
  line-height: 1;
  margin-top: 0.4rem;
}

.card-25__panel {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: #e23744;
  transform: translateY(101%);
  transition: transform 0.55s cubic-bezier(0.76,0,0.24,1);
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
}

.card-25__card:hover .card-25__panel {
  transform: translateY(0);
}

.card-25__panel-num {
  font-family: 'Bodoni Moda', serif;
  font-style: italic;
  font-size: 1rem;
}

.card-25__panel-title {
  font-family: 'Bodoni Moda', serif;
  font-weight: 900;
  font-size: 2.6rem;
  line-height: 0.95;
}

.card-25__panel-desc {
  font-size: 0.88rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.92);
}

.card-25__panel-link {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-top: 1px solid rgba(255,255,255,0.4);
  padding-top: 1rem;
}

@media (prefers-reduced-motion: reduce) {
  .card-25__panel {
    transition: none !important;
  }
}
Paste this into ChatGPT, Claude, Cursor, or any coding assistant. The block below is pre-framed with everything the AI needs to integrate this demo into your project — markup, styles, scoping notes, and the source URL. Hit Copy and paste straight into your chat.
Here's a working CSS Card Hover Effect from CodeFronts. Use it as-is or adapt to your framework. All classes are scoped under a unique prefix so the code won't collide with your existing styles. MIT licensed.
Demo: Overlay Slide
Source: https://codefronts.com/motion/css-card-hover-effects/overlay-slide/

A magazine card where a bold color panel slides up from the bottom to overtake the cover, swapping the teaser for full article details. A strong choice for editorial grids, issue archives, and publication or portfolio listings.
## HTML
```html
<div class="card-25">
  <article class="card-25__card">
    <div class="card-25__base">
      <span class="card-25__base-cat">Editorial</span>
      <h2 class="card-25__base-title">Issue<br>No. 27</h2>
    </div>
    <div class="card-25__panel">
      <span class="card-25__panel-num">№ 27 — Spring</span>
      <h3 class="card-25__panel-title">The Red<br>Issue</h3>
      <p class="card-25__panel-desc">Forty pages on color, courage, and the people painting cities awake.</p>
      <span class="card-25__panel-link">Read the issue →</span>
    </div>
  </article>
</div>
```
## CSS
```css
@import url('https://fonts.googleapis.com/css2?family=Bodoni+Moda:opsz,wght@6..96,500;6..96,900&family=Work+Sans:wght@400;500&display=swap');

.card-25,
.card-25 *,
.card-25 *::before,
.card-25 *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.card-25 {
  width: 100%;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #f2f0eb;
  font-family: 'Work Sans', sans-serif;
  padding: 2rem;
}

.card-25__card {
  position: relative;
  width: 330px;
  height: 440px;
  border-radius: 2px;
  cursor: pointer;
  overflow: hidden;
  background: #1a1a1a;
  box-shadow: 0 18px 40px rgba(0,0,0,0.2);
}

.card-25__base {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.45)), linear-gradient(135deg, #6b7c8c, #2f3a44);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2.2rem;
  color: #fff;
}

.card-25__base-cat {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  opacity: 0.85;
}

.card-25__base-title {
  font-family: 'Bodoni Moda', serif;
  font-weight: 900;
  font-size: 2.4rem;
  line-height: 1;
  margin-top: 0.4rem;
}

.card-25__panel {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: #e23744;
  transform: translateY(101%);
  transition: transform 0.55s cubic-bezier(0.76,0,0.24,1);
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
}

.card-25__card:hover .card-25__panel {
  transform: translateY(0);
}

.card-25__panel-num {
  font-family: 'Bodoni Moda', serif;
  font-style: italic;
  font-size: 1rem;
}

.card-25__panel-title {
  font-family: 'Bodoni Moda', serif;
  font-weight: 900;
  font-size: 2.6rem;
  line-height: 0.95;
}

.card-25__panel-desc {
  font-size: 0.88rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.92);
}

.card-25__panel-link {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-top: 1px solid rgba(255,255,255,0.4);
  padding-top: 1rem;
}

@media (prefers-reduced-motion: reduce) {
  .card-25__panel {
    transition: none !important;
  }
}
```

How this works

The card has a dark overlay layer sitting above the image or resting content. At rest the overlay covers the whole card. On :hover, the overlay slides out via transform: translateY(-100%), revealing the content beneath.

The overlay contains the card's teaser info (title, category tag) so at rest the card reads as a preview. When it slides away, the full content underneath (image, longer description, CTA) becomes visible.

This is the “magazine flip” pattern — quiet at rest, full information on interaction.

Make it yours

  • Change slide direction — translateY(100%) to slide up-off, translateX(-100%) for left-slide.
  • Rebrand the overlay tint from --overlay on .card-25.
  • Add a slight rotation to the slide (rotate(-2deg)) for a paper-tearing feel.
  • Layer two overlays sliding in opposite directions for a curtain-parts effect (see Demo 11).
  • Tune slide duration — 300ms for snappy, 600ms for reveal-worthy.

Gotchas — read before shipping

  • The card MUST have overflow: hidden — otherwise the overlay slides out and stays visible.
  • The overlay needs a solid or high-opacity background — semi-transparent overlays give a &ldquo;dimming&rdquo; effect rather than a clean reveal.
  • Use :focus-within alongside :hover for keyboard equivalence.
  • Under prefers-reduced-motion, replace slide with an opacity fade.
  • The revealed content must be reachable via keyboard — don't apply display: none at rest, use only transform so tabbing still works.

Browser support

ChromeSafariFirefoxEdge
36+9+16+36+

CSS transforms, transitions, and :focus-within are universally supported.

Techniques used in this demo

Search CodeFronts

Loading…