Skip to content

Latest commit

 

History

History
20 lines (16 loc) · 746 Bytes

scroll-behaviour.md

File metadata and controls

20 lines (16 loc) · 746 Bytes

The scroll-behavior CSS property sets the behavior for a scrolling box when scrolling is triggered by the navigation or CSSOM scrolling APIs.

Code example

/* Keyword values */
scroll-behavior: auto;
scroll-behavior: smooth;

/* Global values */
scroll-behavior: inherit;
scroll-behavior: initial;
scroll-behavior: revert;
scroll-behavior: revert-layer;
scroll-behavior: unset;

Result of implementation

<iframe class="interactive is-default-height" height="400" src="https://interactive-examples.mdn.mozilla.net/pages/css/scroll-behavior.html" title="MDN Web Docs Interactive Example" loading="lazy" data-readystate="complete"></iframe>