39 CSS Breadcrumbs32 / 39
Floating Card Shadow CSS Breadcrumb Navigation
Each crumb is an elevated white card floating over the surface with a soft layered shadow, connected by faint dotted trails — a clear, tactile step-by-step path where every node reads as a distinct, liftable card. Hover raises the card higher; the current card rests at the top elevation.
Published Updated
The code
<nav class="bc-32" aria-label="Breadcrumb">
<ol>
<li><a href="#">Home</a></li>
<li><a href="#">Library</a></li>
<li><a href="#">Courses</a></li>
<li><a href="#" aria-current="page">CSS Mastery</a></li>
</ol>
</nav><nav class="bc-32" aria-label="Breadcrumb">
<ol>
<li><a href="#">Home</a></li>
<li><a href="#">Library</a></li>
<li><a href="#">Courses</a></li>
<li><a href="#" aria-current="page">CSS Mastery</a></li>
</ol>
</nav>.bc-32 {
display: grid;
width: 100%;
min-height: 100vh;
--accent: oklch(0.6 0.15 250);
font-family: system-ui,'Segoe UI',sans-serif;
padding: 34px 30px;
background: oklch(0.95 0.006 250);
place-items: center;
}
.bc-32 * {
box-sizing: border-box;
}
.bc-32 ol {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 20px;
list-style: none;
margin: 0;
padding: 0;
}
.bc-32 li {
position: relative;
display: flex;
align-items: center;
}
.bc-32 li + li::before {
content: "";
position: absolute;
left: -20px;
width: 20px;
height: 0;
border-top: 2px dotted oklch(0.78 0.01 250);
z-index: 0;
}
.bc-32 a {
position: relative;
z-index: 1;
display: inline-block;
padding: 9px 16px;
border-radius: 11px;
font: 600 13.5px/1 system-ui,sans-serif;
color: oklch(0.4 0.03 250);
text-decoration: none;
background: #fff;
box-shadow: 0 1px 2px rgba(20,30,60,.1),0 3px 8px rgba(20,30,60,.08);
transition: transform .2s ease,box-shadow .2s ease,color .18s ease;
}
.bc-32 a:hover {
transform: translateY(-2px);
box-shadow: 0 3px 6px rgba(20,30,60,.12),0 10px 22px rgba(20,30,60,.14);
color: var(--accent);
}
.bc-32 a:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 2px;
}
.bc-32 li[aria-current="page"] a {
color: var(--accent);
box-shadow: 0 4px 8px rgba(20,30,60,.14),0 14px 30px rgba(20,30,60,.16);
box-shadow: 0 4px 8px rgba(20,30,60,.14),0 14px 30px rgba(20,30,60,.16),inset 0 0 0 1.5px color-mix(in oklab,var(--accent) 40%,transparent);
}
@media (prefers-reduced-motion: reduce) {
.bc-32 a {
transition: none;
}
}.bc-32 {
display: grid;
width: 100%;
min-height: 100vh;
--accent: oklch(0.6 0.15 250);
font-family: system-ui,'Segoe UI',sans-serif;
padding: 34px 30px;
background: oklch(0.95 0.006 250);
place-items: center;
}
.bc-32 * {
box-sizing: border-box;
}
.bc-32 ol {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 20px;
list-style: none;
margin: 0;
padding: 0;
}
.bc-32 li {
position: relative;
display: flex;
align-items: center;
}
.bc-32 li + li::before {
content: "";
position: absolute;
left: -20px;
width: 20px;
height: 0;
border-top: 2px dotted oklch(0.78 0.01 250);
z-index: 0;
}
.bc-32 a {
position: relative;
z-index: 1;
display: inline-block;
padding: 9px 16px;
border-radius: 11px;
font: 600 13.5px/1 system-ui,sans-serif;
color: oklch(0.4 0.03 250);
text-decoration: none;
background: #fff;
box-shadow: 0 1px 2px rgba(20,30,60,.1),0 3px 8px rgba(20,30,60,.08);
transition: transform .2s ease,box-shadow .2s ease,color .18s ease;
}
.bc-32 a:hover {
transform: translateY(-2px);
box-shadow: 0 3px 6px rgba(20,30,60,.12),0 10px 22px rgba(20,30,60,.14);
color: var(--accent);
}
.bc-32 a:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 2px;
}
.bc-32 li[aria-current="page"] a {
color: var(--accent);
box-shadow: 0 4px 8px rgba(20,30,60,.14),0 14px 30px rgba(20,30,60,.16);
box-shadow: 0 4px 8px rgba(20,30,60,.14),0 14px 30px rgba(20,30,60,.16),inset 0 0 0 1.5px color-mix(in oklab,var(--accent) 40%,transparent);
}
@media (prefers-reduced-motion: reduce) {
.bc-32 a {
transition: none;
}
}/* No JavaScript — each crumb is an elevated card with a two-layer (ambient+key) shadow; hover lifts with translateY + deeper shadow, the current page rests at top elevation. */
/* No JavaScript — each crumb is an elevated card with a two-layer (ambient+key) shadow; hover lifts with translateY + deeper shadow, the current page rests at top elevation. */Here's a working CSS Breadcrumb 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: Floating Card Shadow CSS Breadcrumb Navigation
Source: https://codefronts.com/navigation/css-breadcrumbs/floating-island/
Each crumb is an elevated white card floating over the surface with a soft layered shadow, connected by faint dotted trails — a clear, tactile step-by-step path where every node reads as a distinct, liftable card. Hover raises the card higher; the current card rests at the top elevation.
## HTML
```html
<nav class="bc-32" aria-label="Breadcrumb">
<ol>
<li><a href="#">Home</a></li>
<li><a href="#">Library</a></li>
<li><a href="#">Courses</a></li>
<li><a href="#" aria-current="page">CSS Mastery</a></li>
</ol>
</nav>
```
## CSS
```css
.bc-32 {
display: grid;
width: 100%;
min-height: 100vh;
--accent: oklch(0.6 0.15 250);
font-family: system-ui,'Segoe UI',sans-serif;
padding: 34px 30px;
background: oklch(0.95 0.006 250);
place-items: center;
}
.bc-32 * {
box-sizing: border-box;
}
.bc-32 ol {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 20px;
list-style: none;
margin: 0;
padding: 0;
}
.bc-32 li {
position: relative;
display: flex;
align-items: center;
}
.bc-32 li + li::before {
content: "";
position: absolute;
left: -20px;
width: 20px;
height: 0;
border-top: 2px dotted oklch(0.78 0.01 250);
z-index: 0;
}
.bc-32 a {
position: relative;
z-index: 1;
display: inline-block;
padding: 9px 16px;
border-radius: 11px;
font: 600 13.5px/1 system-ui,sans-serif;
color: oklch(0.4 0.03 250);
text-decoration: none;
background: #fff;
box-shadow: 0 1px 2px rgba(20,30,60,.1),0 3px 8px rgba(20,30,60,.08);
transition: transform .2s ease,box-shadow .2s ease,color .18s ease;
}
.bc-32 a:hover {
transform: translateY(-2px);
box-shadow: 0 3px 6px rgba(20,30,60,.12),0 10px 22px rgba(20,30,60,.14);
color: var(--accent);
}
.bc-32 a:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 2px;
}
.bc-32 li[aria-current="page"] a {
color: var(--accent);
box-shadow: 0 4px 8px rgba(20,30,60,.14),0 14px 30px rgba(20,30,60,.16);
box-shadow: 0 4px 8px rgba(20,30,60,.14),0 14px 30px rgba(20,30,60,.16),inset 0 0 0 1.5px color-mix(in oklab,var(--accent) 40%,transparent);
}
@media (prefers-reduced-motion: reduce) {
.bc-32 a {
transition: none;
}
}
```
## JavaScript
```js
/* No JavaScript — each crumb is an elevated card with a two-layer (ambient+key) shadow; hover lifts with translateY + deeper shadow, the current page rests at top elevation. */
```Here's a working CSS Breadcrumb 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: Floating Card Shadow CSS Breadcrumb Navigation
Source: https://codefronts.com/navigation/css-breadcrumbs/floating-island/
Each crumb is an elevated white card floating over the surface with a soft layered shadow, connected by faint dotted trails — a clear, tactile step-by-step path where every node reads as a distinct, liftable card. Hover raises the card higher; the current card rests at the top elevation.
## HTML
```html
<nav class="bc-32" aria-label="Breadcrumb">
<ol>
<li><a href="#">Home</a></li>
<li><a href="#">Library</a></li>
<li><a href="#">Courses</a></li>
<li><a href="#" aria-current="page">CSS Mastery</a></li>
</ol>
</nav>
```
## CSS
```css
.bc-32 {
display: grid;
width: 100%;
min-height: 100vh;
--accent: oklch(0.6 0.15 250);
font-family: system-ui,'Segoe UI',sans-serif;
padding: 34px 30px;
background: oklch(0.95 0.006 250);
place-items: center;
}
.bc-32 * {
box-sizing: border-box;
}
.bc-32 ol {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 20px;
list-style: none;
margin: 0;
padding: 0;
}
.bc-32 li {
position: relative;
display: flex;
align-items: center;
}
.bc-32 li + li::before {
content: "";
position: absolute;
left: -20px;
width: 20px;
height: 0;
border-top: 2px dotted oklch(0.78 0.01 250);
z-index: 0;
}
.bc-32 a {
position: relative;
z-index: 1;
display: inline-block;
padding: 9px 16px;
border-radius: 11px;
font: 600 13.5px/1 system-ui,sans-serif;
color: oklch(0.4 0.03 250);
text-decoration: none;
background: #fff;
box-shadow: 0 1px 2px rgba(20,30,60,.1),0 3px 8px rgba(20,30,60,.08);
transition: transform .2s ease,box-shadow .2s ease,color .18s ease;
}
.bc-32 a:hover {
transform: translateY(-2px);
box-shadow: 0 3px 6px rgba(20,30,60,.12),0 10px 22px rgba(20,30,60,.14);
color: var(--accent);
}
.bc-32 a:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 2px;
}
.bc-32 li[aria-current="page"] a {
color: var(--accent);
box-shadow: 0 4px 8px rgba(20,30,60,.14),0 14px 30px rgba(20,30,60,.16);
box-shadow: 0 4px 8px rgba(20,30,60,.14),0 14px 30px rgba(20,30,60,.16),inset 0 0 0 1.5px color-mix(in oklab,var(--accent) 40%,transparent);
}
@media (prefers-reduced-motion: reduce) {
.bc-32 a {
transition: none;
}
}
```
## JavaScript
```js
/* No JavaScript — each crumb is an elevated card with a two-layer (ambient+key) shadow; hover lifts with translateY + deeper shadow, the current page rests at top elevation. */
```How this works
Each crumb is a small card: white fill, rounded corners, and a two-layer soft shadow (a tight ambient layer plus a wider, softer key-light layer) — the modern 'realistic elevation' recipe rather than a single hard shadow. Between cards, a faint dotted connector (li + li::before with a repeating-linear-gradient or a dotted border) traces the path without competing with the cards. The layout is flex with gap, so cards keep even spacing and wrap as tidy rows.
Elevation encodes state: at rest cards sit at elevation 1; on :hover/:focus-visible the card lifts with a translateY(-2px) and a deeper shadow (elevation 3), giving a physical 'pick up' feel; the current page rests permanently at the highest elevation with an accent-tinted edge, so 'you are here' reads as the raised card. The two-layer shadow scaling with elevation is what makes the lift feel real rather than a flat colour change.
Make it yours
- Elevation scale: define 3 shadow presets (rest/hover/current) as tokens and swap between them — matches Material/Fluent elevation systems.
- Connector style: dotted, dashed, or a thin solid line — set on the
::before; drop it for pure floating cards. - Add a leading icon per card for a richer node; the card padding accommodates it.
- Warm the shadows with a slight hue (not pure black) for a softer, more designed feel.
Gotchas — read before shipping
- Use two stacked shadows (ambient + key) — a single large soft shadow looks like a blurry glow, not elevation.
- Animate
transform+box-shadowonly; never animatetop/marginfor the lift (layout thrash). - Keep the connector behind the cards (
z-index) andpointer-events:noneso it never blocks a card click. - Don't over-elevate — cards that lift too far on hover feel jumpy; 2px + a modest shadow bump is enough.
Browser support
| Chrome | Safari | Firefox | Edge |
|---|---|---|---|
| 111+ | 16.2+ | 113+ | 111+ |
Floor set by oklch(), color-mix() as this demo is written. The core technique itself goes back further — Chrome all.
Multi-layer box-shadow, transform and flex gap are universally supported. Nothing bleeding-edge; works on any production site.