Style scrollBehavior Property
Style scrollBehavior Property
The scrollBehavior property is used to specify whether to smoothly animate the scroll position or a straight jump when the user clicks on a link within a scrollable box.
Syntax:-
Its syntax is:- object.style.scrollBehavior = auto | smooth | initial | inherit
Further Explanation:-
Value | Description |
---|---|
auto | Allows a straight jump scroll effect. |
smooth | Allows a smooth animated scroll effect. |
initial | Sets property to its default value. |
inherit | Inherits property from its parent element. |