# Hover Reveal Card

> An image card whose caption slides up with extra details on hover.

- Category: [CSS Cards](https://copy-css.com/category/cards)
- Tags: image, overlay, caption, hover, reveal
- Live preview: https://copy-css.com/snippets/hover-reveal-card
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```html
<div class="reveal-card">
  <div class="reveal-caption">
    <h3>Mountains</h3>
    <p>Hover to read more</p>
  </div>
</div>
```

## CSS

```css
.reveal-card {
  position: relative;
  overflow: hidden;
  width: 220px;
  height: 150px;
  border-radius: 16px;
  /* Swap for: url(photo.jpg) center / cover */
  background: linear-gradient(160deg, #38bdf8, #6366f1 60%, #1e1b4b);
  color: #fff;
  font-family: system-ui, sans-serif;
}

.reveal-caption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 14px 16px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
  transform: translateY(40%);
  transition: transform 0.3s ease;
}

.reveal-card h3 {
  margin: 0;
  font-size: 17px;
}

.reveal-card p {
  margin: 4px 0 0;
  font-size: 13px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.reveal-card:hover .reveal-caption {
  transform: none;
}

.reveal-card:hover p {
  opacity: 0.85;
}
```

## Notes

- This CSS Hover Reveal Card is 42 lines of pure CSS (0.8 KB) with no JavaScript and no dependencies. It uses transitions, transforms and linear gradients.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
