CSS Hover Lift Card

A clean, minimal card that lifts up with a soft shadow on hover.

  • hover
  • lift
  • shadow
  • clean
HTML
<div class="card-lift">
  <span class="card-lift-tag">New</span>
  <h3>Hover me</h3>
  <p>A clean card that lifts with a soft shadow.</p>
</div>
CSS
.card-lift {
  width: 220px;
  padding: 22px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  font-family: system-ui, sans-serif;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.18);
}

.card-lift-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 12px;
  font-weight: 700;
}

.card-lift h3 {
  margin: 12px 0 4px;
  font-size: 18px;
}

.card-lift p {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
}

About this CSS Hover Lift Card

This CSS Hover Lift Card is 36 lines of pure CSS (0.6 KB) with no JavaScript and no dependencies. It uses transitions, transforms and box shadows. It works in current versions of Chrome, Edge, Safari and Firefox. It works in any stack: plain HTML, React, Vue, Svelte, Astro, WordPress or Webflow.

CSS features used

Customize it

The colors in this snippet. Search and replace them to match your brand:

  • #e5e7eb
  • #fff
  • #eef2ff
  • #4f46e5
  • #6b7280

How to use this hover lift card

  1. Copy the HTML and paste it where you want the element to appear.
  2. Copy the CSS into your stylesheet, or inside a <style> tag.
  3. Keep the .card-lift class name, or rename it in both places. Then tweak colors, sizes and timing to match your design.
  4. Using React or Next.js? Change class to className in the HTML. The CSS works as is, including in Tailwind projects (put it in your global stylesheet).

Building with an AI tool?

“Copy for AI” copies a short prompt for Cursor, Claude Code, Lovable, Bolt or v0. Your AI tool opens the Markdown version of this snippet and reads the HTML, CSS and setup notes there. If your tool can't open links, with the code instead. More ways to use copy CSS with AI.

Feedback