Enable auto navigation transitions
@view-transition {
navigation: auto;
}
The @view-transition at-rule opts the document into the View Transitions API for navigations. Use it with view-transition-name to animate shared elements between pages or states.
@view-transition {
navigation: auto;
}@view-transition {
navigation: auto;
}.hero {
view-transition-name: hero;
}@view-transition is a modern CSS at-rule.
Check current browsers before relying on advanced behavior.
Bottom line: Use progressive enhancement. Keep a readable fallback when a browser ignores the at-rule.
Adapt layouts to viewport and device conditions.
CODETOFUN NEWS
Get the latest IT news, programming updates, and technology trends directly on your phone.
Your daily dose of tech, straight to your feed.
3 people found this page helpful