CSS Feature Card

A landing-page feature card with a tinted icon badge that tilts on hover.

  • feature
  • icon
  • landing page
  • hover
  • grid
HTML
<div class="feature-card">
  <span class="feature-icon">
    <svg viewBox="0 0 24 24" width="22" height="22" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M13 2 3 14h9l-1 8 10-12h-9l1-8z"/></svg>
  </span>
  <h3>Lightning fast</h3>
  <p>No frameworks, no build step. Just CSS.</p>
</div>
CSS
.feature-card {
  width: 210px;
  padding: 20px;
  border: 1px solid #dcfce7;
  border-radius: 16px;
  background: #fff;
  font-family: system-ui, sans-serif;
  transition: border-color 0.2s ease;
}

.feature-card:hover {
  border-color: #86efac;
}

.feature-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #dcfce7;
  color: #16a34a;
  transition: transform 0.25s ease;
}

.feature-card:hover .feature-icon {
  transform: rotate(-8deg) scale(1.08);
}

.feature-card h3 {
  margin: 14px 0 4px;
  color: #14532d;
  font-size: 16px;
}

.feature-card p {
  margin: 0;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.5;
}

About this CSS Feature Card

This CSS Feature Card is 41 lines of pure CSS (0.7 KB) with no JavaScript and no dependencies. It uses transitions, transforms and CSS Grid. 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:

  • #dcfce7
  • #fff
  • #86efac
  • #16a34a
  • #14532d
  • #4b5563

How to use this feature 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 .feature-card 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