Refactor z-index values and optimize CSS properties for various seasonal styles; enhance performance with will-change property [skip ci]
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
pointer-events: none;
|
||||
z-index: 9999;
|
||||
z-index: 10;
|
||||
overflow: hidden;
|
||||
contain: strict;
|
||||
contain: layout paint;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
pointer-events: none;
|
||||
z-index: 10000;
|
||||
z-index: 10;
|
||||
contain: layout paint;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
pointer-events: none;
|
||||
z-index: 10; /* Behind popups but over background */
|
||||
z-index: 10;
|
||||
contain: strict;
|
||||
overflow: hidden;
|
||||
}
|
||||
@@ -30,8 +30,9 @@
|
||||
}
|
||||
|
||||
.oscar-spotlight {
|
||||
will-change: transform;
|
||||
position: absolute;
|
||||
top: -10vh;
|
||||
top: 0;
|
||||
/* MARK: SPOTLIGHT WIDTH CONFIGURATION */
|
||||
/* To adjust bottom width (spread), change 'width' property (e.g., 20vw for narrow, 40vw for wide). */
|
||||
/* To adjust top width (origin), modify first two percentages in 'clip-path' (e.g., 48% 0, 52% 0 for a very thin start). */
|
||||
@@ -42,9 +43,11 @@
|
||||
transform-origin: top center;
|
||||
animation: spotlight-sweep 12s infinite alternate ease-in-out;
|
||||
mix-blend-mode: screen;
|
||||
translate: 0 -10vh;
|
||||
}
|
||||
|
||||
.oscar-flash {
|
||||
will-change: transform;
|
||||
position: absolute;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
|
||||
@@ -16,9 +16,7 @@
|
||||
z-index: 15;
|
||||
top: 0;
|
||||
translate: 0 -15vh;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
cursor: default;
|
||||
user-select: none;
|
||||
cursor: default;
|
||||
animation-name: resurrection-fall;
|
||||
animation-timing-function: linear;
|
||||
|
||||
@@ -21,40 +21,13 @@
|
||||
color: #fff;
|
||||
font-family: Arial, sans-serif;
|
||||
text-shadow: 0 0 5px #000;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
cursor: default;
|
||||
-webkit-animation-name: heart-fall, heart-shake;
|
||||
-webkit-animation-duration: 12s, 3s;
|
||||
-webkit-animation-timing-function: linear, ease-in-out;
|
||||
-webkit-animation-iteration-count: infinite, infinite;
|
||||
animation-name: snowflakes-fall, snowflakes-shake;
|
||||
user-select: none;
|
||||
cursor: default;
|
||||
animation-name: snowflakes-fall, snowflakes-shake;
|
||||
animation-duration: 12s, 3s;
|
||||
animation-timing-function: linear, ease-in-out;
|
||||
animation-iteration-count: infinite, infinite;
|
||||
@-webkit-keyframes snowflakes-fall {
|
||||
0% {
|
||||
translate: 0 -10vh;
|
||||
}
|
||||
}
|
||||
100% {
|
||||
translate: 0 110vh;
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes snowflakes-shake {
|
||||
|
||||
0%,
|
||||
100% {
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: translateX(80px);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -5,12 +5,13 @@
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
pointer-events: none;
|
||||
z-index: 9999;
|
||||
z-index: 10;
|
||||
overflow: hidden;
|
||||
contain: strict;
|
||||
}
|
||||
|
||||
.space-bg-glow {
|
||||
will-change: transform;
|
||||
position: absolute;
|
||||
top: 0; left: 0; width: 100vw; height: 100vh;
|
||||
background: radial-gradient(circle at 70% 30%, rgba(138, 43, 226, 0.15), transparent 60%),
|
||||
@@ -33,6 +34,7 @@
|
||||
}
|
||||
|
||||
.space-shooting-star {
|
||||
will-change: opacity;
|
||||
position: absolute;
|
||||
width: 250px;
|
||||
height: 3px;
|
||||
@@ -61,11 +63,11 @@
|
||||
}
|
||||
|
||||
.space-symbol img {
|
||||
will-change: transform;
|
||||
width: 6vh;
|
||||
height: auto;
|
||||
max-width: 60px;
|
||||
object-fit: contain;
|
||||
/* Add a slow spin to images */
|
||||
animation: space-slow-spin var(--rot-dur, 20s) linear infinite;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
height: 100%;
|
||||
pointer-events: none;
|
||||
z-index: 10;
|
||||
contain: layout paint;
|
||||
}
|
||||
|
||||
.spooky {
|
||||
@@ -16,19 +17,8 @@
|
||||
will-change: transform;
|
||||
translate: 0 120vh;
|
||||
z-index: 15;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
cursor: default;
|
||||
|
||||
-webkit-animation-name: spooky-float;
|
||||
-webkit-animation-duration: 10s;
|
||||
-webkit-animation-timing-function: linear;
|
||||
-webkit-animation-iteration-count: infinite;
|
||||
-webkit-animation-play-state: running;
|
||||
|
||||
animation-name: spooky-float;
|
||||
animation-duration: 10s;
|
||||
animation-timing-function: linear;
|
||||
@@ -40,13 +30,6 @@
|
||||
width: 30px;
|
||||
height: auto;
|
||||
will-change: transform;
|
||||
|
||||
-webkit-animation-name: spooky-shake;
|
||||
-webkit-animation-duration: 3s;
|
||||
-webkit-animation-timing-function: ease-in-out;
|
||||
-webkit-animation-iteration-count: infinite;
|
||||
-webkit-animation-play-state: running;
|
||||
|
||||
animation-name: spooky-shake;
|
||||
animation-duration: 3s;
|
||||
animation-timing-function: ease-in-out;
|
||||
@@ -59,22 +42,6 @@
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@-webkit-keyframes spooky-float {
|
||||
0% {
|
||||
translate: 0 120vh;
|
||||
opacity: 0;
|
||||
}
|
||||
10% {
|
||||
opacity: 0.8;
|
||||
}
|
||||
90% {
|
||||
opacity: 0.8;
|
||||
}
|
||||
100% {
|
||||
translate: 0 -150px;
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes spooky-float {
|
||||
0% {
|
||||
@@ -93,14 +60,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes spooky-shake {
|
||||
0%, 100% {
|
||||
transform: translateX(0) scale(1) rotate(15deg);
|
||||
}
|
||||
50% {
|
||||
transform: translateX(80px) scale(1.2) rotate(-15deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes spooky-shake {
|
||||
0%, 100% {
|
||||
@@ -111,7 +70,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
/* Base predefined starting offsets (if not overridden by js) */
|
||||
.spooky:nth-of-type(0) { left: 1%; }
|
||||
.spooky:nth-of-type(1) { left: 10%; }
|
||||
.spooky:nth-of-type(2) { left: 20%; }
|
||||
|
||||
@@ -5,16 +5,17 @@
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
pointer-events: none;
|
||||
z-index: 9999;
|
||||
z-index: 10;
|
||||
overflow: hidden;
|
||||
contain: strict;
|
||||
}
|
||||
|
||||
.sports-symbol {
|
||||
position: absolute;
|
||||
top: -10vh;
|
||||
top: 0;
|
||||
opacity: 0.9;
|
||||
z-index: 40;
|
||||
translate: 0 -10vh;
|
||||
}
|
||||
|
||||
.sports-inner {
|
||||
@@ -29,13 +30,15 @@
|
||||
}
|
||||
|
||||
.sports-confetti {
|
||||
will-change: transform, opacity;
|
||||
position: absolute;
|
||||
top: -5vh;
|
||||
top: 0;
|
||||
width: 10px;
|
||||
height: 15px;
|
||||
opacity: 0.8;
|
||||
animation: sports-confetti-fall linear infinite;
|
||||
border-radius: 2px;
|
||||
translate: 0 -5vh;
|
||||
}
|
||||
|
||||
.sports-confetti.circle {
|
||||
|
||||
@@ -29,13 +29,14 @@
|
||||
/* Sunbeams */
|
||||
.spring-sunbeam {
|
||||
position: fixed;
|
||||
top: -50%;
|
||||
top: 0;
|
||||
height: 200%;
|
||||
background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 200, 0.08) 50%, rgba(255, 255, 255, 0));
|
||||
z-index: 5;
|
||||
transform-origin: top center;
|
||||
pointer-events: none;
|
||||
opacity: 0;
|
||||
translate: 0 -50vh;
|
||||
}
|
||||
|
||||
/* Grass Container (Wrapper) */
|
||||
@@ -72,6 +73,7 @@
|
||||
|
||||
/* SVG Meadow Layer */
|
||||
.spring-meadow-layer {
|
||||
will-change: transform;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
@@ -94,6 +96,7 @@
|
||||
}
|
||||
|
||||
.spring-sway {
|
||||
will-change: transform;
|
||||
transform-origin: bottom center;
|
||||
animation: spring-meadow-sway 4s ease-in-out infinite alternate;
|
||||
}
|
||||
|
||||
@@ -13,10 +13,11 @@
|
||||
|
||||
.starwars-center {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
top: 0;
|
||||
left: 50%;
|
||||
width: 0;
|
||||
height: 0;
|
||||
translate: 0 50vh;
|
||||
}
|
||||
|
||||
.starwars-streak {
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
}
|
||||
|
||||
.underwater-seaweed {
|
||||
will-change: transform, opacity;
|
||||
position: absolute;
|
||||
bottom: -1vh;
|
||||
font-size: 4rem;
|
||||
@@ -52,6 +53,7 @@
|
||||
}
|
||||
|
||||
.underwater-bubble {
|
||||
will-change: transform;
|
||||
position: absolute;
|
||||
bottom: -5vh;
|
||||
border-radius: 50%;
|
||||
@@ -73,13 +75,13 @@
|
||||
}
|
||||
|
||||
@keyframes underwater-traverse-up {
|
||||
0% { top: 120vh; }
|
||||
100% { top: -20vh; }
|
||||
0% { top: 0; translate: 0 120vh; }
|
||||
100% { top: 0; translate: 0 -20vh; }
|
||||
}
|
||||
|
||||
@keyframes underwater-traverse-down {
|
||||
0% { top: -20vh; }
|
||||
100% { top: 120vh; }
|
||||
0% { top: 0; translate: 0 -20vh; }
|
||||
100% { top: 0; translate: 0 120vh; }
|
||||
}
|
||||
|
||||
@keyframes underwater-sway-y {
|
||||
@@ -101,8 +103,9 @@
|
||||
}
|
||||
|
||||
.underwater-god-rays {
|
||||
will-change: transform;
|
||||
position: absolute;
|
||||
top: -50vh;
|
||||
top: 0;
|
||||
left: -50vw;
|
||||
width: 200vw;
|
||||
height: 200vh;
|
||||
@@ -119,6 +122,7 @@
|
||||
transform-origin: top center;
|
||||
mix-blend-mode: overlay;
|
||||
filter: blur(5px);
|
||||
translate: 0 -50vh;
|
||||
}
|
||||
|
||||
@keyframes god-rays-sway {
|
||||
|
||||
Reference in New Issue
Block a user