# Fade In on Scroll

> Items fade and slide up as they scroll into view, with animation-timeline: view() instead of a scroll library.

- Category: [CSS Effects](https://copy-css.com/category/effects)
- Tags: scroll-driven, reveal, view timeline, fade up, animate on scroll, aos
- Live preview: https://copy-css.com/snippets/fade-in-on-scroll
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```html
<ul class="scroll-reveal">
  <li>Plan</li>
  <li>Design</li>
  <li>Build</li>
  <li>Launch</li>
</ul>
```

## CSS

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

.scroll-reveal li {
  padding: 22px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 18px -10px rgba(20, 83, 45, 0.35);
  color: #14532d;
  font-size: 18px;
  font-weight: 700;
}

@supports (animation-timeline: view()) {
  .scroll-reveal li {
    animation: scroll-reveal-in linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 30%;
  }
}

@keyframes scroll-reveal-in {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-reveal li {
    animation: none;
  }
}
```

## Notes

- This CSS Fade In on Scroll is 44 lines of pure CSS (0.7 KB) with no JavaScript and no dependencies. It uses scroll-driven animations, keyframe animations, transforms and box shadows.
- scroll-driven animations: Chrome and Edge 115+ and Safari 26+. Firefox support is very recent; browsers without it skip the animation and show the content as is.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
