How to enable smooth scrolling on page change..? #9037
-
good day, As when one changes to a new route.. the pages jumps up in one shot instantly, what i have been reading this should be the default but this does not seem to be the case if one creates a project in the following way.
im i missing something..? kind regards. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Add the following rule to a global css file such as html {
scroll-behavior: smooth;
} |
Beta Was this translation helpful? Give feedback.
Add the following rule to a global css file such as
app.css
and import it into the root layoutsrc/routes/+layout.svelte
withimport '../app.css'