Si actualizo la página y me desplazo hacia abajo, el sitio web se retrasa unos milisegundos y continúa después. el problema solo vuelve después de actualizar la página. ¿Alguna posible solución para eso? Gracias
intente agregar esto. Vea si ayuda. borre su caché e intente ejecutar en un navegador diferente si eso es un problema del navegador.
html { scroll-behavior: smooth; }Entiendo tu problema. yo
escribir un código simple para el comportamiento de desplazamiento ver mi enlace codepen y
html { scroll-behavior: smooth; } #test1 { height: 600px; background-color: green; } #test2 { height: 600px; background-color: black; color:white; } <!DOCTYPE html> <html> <head> </head> <body> <h1>Smooth Scroll</h1> <div class="main" id="test1"> <h2>Section 1</h2> <p>Click on the link to see the "smooth" scrolling effect.</p> <a href="#test2">Click Me to Smooth Scroll to Section 2 Below</a> <p>Note: Remove the scroll-behavior property to remove smooth scrolling.</p> </div> <div class="main" id="test2"> <h2>Section 2</h2> <a href="#test1">Click Me to Smooth Scroll to Section 1 Above</a> </div> <p><strong>Note:</strong> The scroll-behavior property is not supported in Internet Explorer.</p> </body> </html>También sugeriría esto:
html { scroll-behavior: smooth; }