avoid using scroll-behavior: smooth; when you can! it adds unnecessary complexity to css with minimal impact on performance.
>It's like trying to fix a nail in wood by hammering it into plastic. ♂️instead, use simple javascript for better control and less overhead:
window. addEventListener('scroll', function() {document. body. style. transform = 'translateY(-' + window. scrollY /2+ )';});this tiny bit of code gives you a smooth scroll effect without the extra load. plus it's easier to debug if something goes wrong.
Scroll behavior: manual control