# Stacking Cards on Scroll

> Cards that pile up on top of each other as you scroll, each sticking a little lower, with plain position: sticky.

- Category: [CSS Effects](https://copy-css.com/category/effects)
- Tags: sticky, stack, scroll, cards, position sticky, storytelling
- Live preview: https://copy-css.com/snippets/stacking-cards-scroll
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```html
<ol class="stack-scroll">
  <li style="--i: 0">01 · Research</li>
  <li style="--i: 1">02 · Prototype</li>
  <li style="--i: 2">03 · Test</li>
  <li style="--i: 3">04 · Ship</li>
</ol>
```

## CSS

```css
.stack-scroll {
  display: grid;
  gap: 60px;
  margin: 0;
  padding: 0 0 40px;
  list-style: none;
  font-family: system-ui, sans-serif;
}

.stack-scroll li {
  position: sticky;
  top: calc(16px + var(--i) * 14px);
  display: flex;
  align-items: flex-end;
  height: 120px;
  padding: 18px;
  box-sizing: border-box;
  border-radius: 18px;
  background: hsl(calc(250 + var(--i) * 30) 85% 65%);
  box-shadow: 0 -8px 24px -12px rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
}
```

## Notes

- This CSS Stacking Cards on Scroll is 24 lines of pure CSS (0.5 KB) with no JavaScript and no dependencies. It uses box shadows, CSS Grid, Flexbox and sticky positioning.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
