CSS scroll behavior Property
CSS scroll-behavior Property
The scroll-behavior property is used to specify whether to smoothly animate the scroll position when the user clicks on a link within a scrollable box or a straight jump when the user clicks on a link within a scrollable box.
Default Value:-
Its default value is auto.
Syntax:-
Its syntax is:- scroll-behavior: auto | smooth | initial | inherit;
Further Explanation:-
Value | Description |
---|---|
auto | Allows a straight jump scroll effect between elements within the scrolling box. |
smooth | Allows a smooth animated scroll effect between elements within the scrolling box. |
initial | Sets this property to its default value. |
inherit | Inherits this property from its parent element. |