Spec-Zone.ru › CSS

`::view-transition` CSS pseudo-element

Baseline Newly available

This feature works across the latest devices and browser versions. This feature might not work in older devices or browser versions. It's been available across browsers since October 2025.

The ::view-transition CSS pseudo-element represents the root of the view transitions overlay, which contains all view transition snapshot groups and sits over the top of all other page content.

During a view transition, ::view-transition is included in the associated pseudo-element tree as explained in The view transition pseudo-element tree. It is the top-level node of this tree, and has one or more ::view-transition-group()s as children.

::view-transition is given the following default styling in the UA stylesheet:

:root::view-transition {
  position: fixed;
  inset: 0;
}

All ::view-transition-group() pseudo-elements are positioned relative to the view transition root.

Syntax

::view-transition {
  /* ... */
}

Examples

::view-transition {
  background-color: rgb(0 0 0 / 25%);
}

Specifications

Specification
CSS View Transitions Module Level 1
# selectordef-view-transition

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Opera Safari Chrome Android Firefox for Android Opera Android Safari on iOS Samsung Internet WebView Android WebView on iOS
view-transition
109
109
144
95
18
109
144
74
18
21.0
109
18

See also

  • View Transition API
  • Smooth transitions with the View Transition API

© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Selectors/::view-transition

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API