@view-transition { navigation: auto; } /* Apply the custom animation to the old and new page states */ ::view-transition-old(root) { animation: 0.4s ease-in both move-out; } ::view-transition-new(root) { animation: 0.4s ease-in both move-in; } @keyframes move-out { from { opacity: 1; } to { opacity: 0; } } @keyframes move-in { from { opacity: 0; } to { opacity: 1; } }