diff --git a/scripts/pages/user/main.js b/scripts/pages/user/main.js index 2e17cbd..ce65a90 100644 --- a/scripts/pages/user/main.js +++ b/scripts/pages/user/main.js @@ -2,6 +2,10 @@ document.addEventListener('DOMContentLoaded', function () { var h1 = document.querySelector('.user-index-h1'); var h2 = document.querySelector('.user-index-h2'); + // Trigger the reflow to restart the CSS animation + void h1.offsetWidth; + void h2.offsetWidth; + // Add the fade-in class to trigger the animation h1.classList.add('fade-in'); h2.classList.add('fade-in');