Your browser does not support the CSS View Transition API 😢

Welcome to Page 2

This is the CSS used to acheive our animation.

With the addition of this custom CSS, note some of the layout issues. For instance, the way the transitioning page overlaps the sticky header.


main {
	view-transition-name: main;
}

@keyframes fade {
	from {
		opacity: 1;
	}

	to {
		opacity: 0;
		scale: 0.9;
		transform: rotateY(90deg);
	}
}

/* Old stuff coming out */
:root::view-transition-old(main) {
	animation: fade 0.2s ease-out forwards;
	width: fit-content;
	z-index: 1;
}

/* New stuff coming in */
:root::view-transition-new(main) {
	animation: fade 0.3s ease-in reverse;
	width: fit-content;
	z-index: 1;
}