This commit is contained in:
oliver
2026-06-24 07:00:33 -03:00
parent fa3694bd58
commit 7631d0b462
+9 -9
View File
@@ -200,7 +200,7 @@
align-items: center; align-items: center;
background-size: cover; background-size: cover;
background-position: center; background-position: center;
transform: translateX(100%); transform: translateY(-100%);
opacity: 0; opacity: 0;
transition: transition:
transform 0.5s ease, transform 0.5s ease,
@@ -208,12 +208,12 @@
z-index: 1; z-index: 1;
} }
.hero-slide.active { .hero-slide.active {
transform: translateX(0); transform: translateY(0);
opacity: 1; opacity: 1;
z-index: 2; z-index: 2;
} }
.hero-slide.prev { .hero-slide.prev {
transform: translateX(-100%); transform: translateY(100%);
opacity: 0; opacity: 0;
z-index: 1; z-index: 1;
} }
@@ -1549,30 +1549,30 @@
var current = slides[si]; var current = slides[si];
var next = slides[i]; var next = slides[i];
if (direction === 1) { if (direction === 1) {
current.style.transform = "translateX(-100%)"; current.style.transform = "translateY(100%)";
current.style.opacity = "0"; current.style.opacity = "0";
current.style.zIndex = "1"; current.style.zIndex = "1";
next.style.transform = "translateX(100%)"; next.style.transform = "translateY(-100%)";
next.style.opacity = "0"; next.style.opacity = "0";
next.style.zIndex = "1"; next.style.zIndex = "1";
requestAnimationFrame(function () { requestAnimationFrame(function () {
next.style.transition = next.style.transition =
"transform 0.5s ease, opacity 0.5s ease"; "transform 0.5s ease, opacity 0.5s ease";
next.style.transform = "translateX(0)"; next.style.transform = "translateY(0)";
next.style.opacity = "1"; next.style.opacity = "1";
next.style.zIndex = "2"; next.style.zIndex = "2";
}); });
} else { } else {
current.style.transform = "translateX(100%)"; current.style.transform = "translateY(-100%)";
current.style.opacity = "0"; current.style.opacity = "0";
current.style.zIndex = "1"; current.style.zIndex = "1";
next.style.transform = "translateX(-100%)"; next.style.transform = "translateY(100%)";
next.style.opacity = "0"; next.style.opacity = "0";
next.style.zIndex = "1"; next.style.zIndex = "1";
requestAnimationFrame(function () { requestAnimationFrame(function () {
next.style.transition = next.style.transition =
"transform 0.5s ease, opacity 0.5s ease"; "transform 0.5s ease, opacity 0.5s ease";
next.style.transform = "translateX(0)"; next.style.transform = "translateY(0)";
next.style.opacity = "1"; next.style.opacity = "1";
next.style.zIndex = "2"; next.style.zIndex = "2";
}); });