window.addEventListener("scroll", function() { let scroll = window.pageYOffset; if (scroll > 120) { document.getElementById('fixed-area').style.top = '40px'; } else { document.getElementById('fixed-area').style.top = '180px'; } });