CSS Corner Fill Card
A link card where a small corner circle grows to flood the card with color and invert the text on hover.
<a class="fill-card" href="#">
<span class="fill-card-arrow" aria-hidden="true">→</span>
<h3>Get started</h3>
<p>Set up your first project in under five minutes.</p>
</a>
.fill-card {
position: relative;
display: block;
width: 220px;
padding: 22px;
overflow: hidden;
border-radius: 16px;
background: #fff;
color: #431407;
font-family: system-ui, sans-serif;
text-decoration: none;
isolation: isolate;
transition: color 0.4s ease;
}
.fill-card::before {
content: "";
position: absolute;
top: -30px;
right: -30px;
z-index: -1;
width: 80px;
height: 80px;
border-radius: 50%;
background: #ea580c;
transition: transform 0.5s ease;
}
.fill-card:hover,
.fill-card:focus-visible {
color: #fff;
}
.fill-card:hover::before,
.fill-card:focus-visible::before {
transform: scale(8);
}
.fill-card:focus-visible {
outline: 3px solid #9a3412;
outline-offset: 3px;
}
.fill-card-arrow {
position: absolute;
top: 10px;
right: 14px;
color: #fff;
font-size: 18px;
font-weight: 700;
}
.fill-card h3 {
margin: 0 0 6px;
font-size: 18px;
}
.fill-card p {
margin: 0;
font-size: 14px;
line-height: 1.5;
opacity: 0.85;
}
@media (prefers-reduced-motion: reduce) {
.fill-card,
.fill-card::before {
transition: none;
}
}
About this CSS Corner Fill Card
This CSS Corner Fill Card is 70 lines of pure CSS (1.1 KB) with no JavaScript and no dependencies. It uses transitions, transforms, keyboard focus styles and reduced-motion support. 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:
#fff#431407#ea580c#9a3412
How to use this corner fill card
- Copy the HTML and paste it where you want the element to appear.
- Copy the CSS into your stylesheet, or inside a
<style>tag. - Keep the
.fill-cardclass name, or rename it in both places. Then tweak colors, sizes and timing to match your design. - Using React or Next.js? Change
classtoclassNamein 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.