From da637d62281cac1dfc9932c1b8ce300fad851390 Mon Sep 17 00:00:00 2001 From: AkisYTB3 Date: Thu, 25 Jan 2024 16:06:43 +0100 Subject: [PATCH] changes to fade anim --- scripts/pages/user/main.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/pages/user/main.js b/scripts/pages/user/main.js index 6f3c5ac..23d0559 100644 --- a/scripts/pages/user/main.js +++ b/scripts/pages/user/main.js @@ -4,21 +4,21 @@ document.addEventListener('DOMContentLoaded', function () { // Initial styles for fade-in effect h1.style.opacity = '0'; - h1.style.transform = 'translateX(-20px)'; + h1.style.transform = 'translateX(-35px)'; h2.style.opacity = '0'; - h2.style.transform = 'translateX(-20px)'; + h2.style.transform = 'translateX(-35px)'; // Trigger the reflow to restart the CSS animation void h1.offsetWidth; void h2.offsetWidth; // Apply the fade-in effect - h1.style.transition = 'opacity 0.8s ease, transform 0.8s ease'; + h1.style.transition = 'opacity 0.8s ease, transform 0.6s ease'; h1.style.opacity = '1'; h1.style.transform = 'translateX(0)'; - h2.style.transition = 'opacity 0.8s ease, transform 0.8s ease'; + h2.style.transition = 'opacity 0.8s ease, transform 0.6s ease'; h2.style.opacity = '1'; h2.style.transform = 'translateX(0)'; });