Skip to content

Instantly share code, notes, and snippets.

@leabs
Created January 15, 2024 23:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leabs/4d9180fcce9f7abd1dd2831e57b0d2c9 to your computer and use it in GitHub Desktop.
Save leabs/4d9180fcce9f7abd1dd2831e57b0d2c9 to your computer and use it in GitHub Desktop.
visionOS CSS Transition
/* Fixed background image, replace with css gradient if you are cool */
.cssbackground {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image: url("bg.png");
background-size: cover;
z-index: -1;
}
@keyframes blur-in {
0% {
filter: blur(130px);
opacity: 0;
transform: scale(1);
}
50% {
transform: scale(1.35);
}
,
100% {
filter: blur(0px);
opacity: 1;
}
}
/* Apply view transition to .content */
.content {
animation: blur-in 0.3s ease-out;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment