# ::view-transition-old()

> The `::view-transition-old()` CSS pseudo-element represents the snapshot of an element before a view transition.

## How do I customize the old state animation in a view transition?

The pseudo-element that represents a static snapshot of the old state of an element. By default, it fades out while the new state fades in, and can be given any custom animation.

- Topic: View Transitions
- Type: pseudo-element
- Browser support: Chrome 109+, Chrome Android 109+, Edge 109+, Firefox 144+, Firefox Android 144+, Safari 18+, Safari iOS 18+

## Example

Wrong:

```css
::view-transition-old(root) {
  animation: slide-out 0.3s;
}
```

Right:

```css
::view-transition-old(root) {
  animation: slide-out 0.3s;
}
::view-transition-new(root) {
  animation: slide-in 0.3s;
}
```

The new view gets a matching entry animation, so the custom exit doesn't clash with the default fade-in.

## Common mistakes

- Expecting the old view to update during the transition; it is a static snapshot.

## Key points

- Custom exit animations on `::view-transition-old()` have matching entry animations on `::view-transition-new()`.
- The default cross-fade is removed with `animation: none` only when a replacement animation exists.
- Motion is removed or reduced inside `@media (prefers-reduced-motion: reduce)`.

## Interview questions

### What is the default animation of ::view-transition-old()?

A fade-out that runs while `::view-transition-new()` fades in, which creates a cross-fade.

### Why does the old view look frozen?

It is a static image captured before the DOM update, so animations and video inside it don't play.

## Related cards

- [::view-transition-new()](https://wonderium.dev/css/view-transition-new.md)
- [::view-transition-group()](https://wonderium.dev/css/view-transition-group.md)
- [::view-transition](https://wonderium.dev/css/view-transition.md)
- [@keyframes](https://wonderium.dev/css/keyframes.md)
- [object-fit](https://wonderium.dev/css/object-fit.md)

---

- Level: [CSS](https://wonderium.dev/css.md)
- HTML version: https://wonderium.dev/css/view-transition-old
- Last updated: 2026-11-25
