CSS ::view-transition-group()
The ::view-transition-group() pseudo-element is the container for a single named view transition. It contains the image pair for the old and new views.
Syntax
::view-transition-group(root) {
animation-duration: 0.4s;
}
Example
.card {
view-transition-name: product-card;
}
::view-transition-group(product-card) {
animation-duration: 0.4s;
animation-timing-function: ease-out;
}
Important note
This selector does not animate a list by itself. It styles a generated group after the View Transition API creates snapshots.