The scroll-behavior property sets how a scrolling box moves when scrolling is triggered by navigation (such as clicking an in-page link) or by certain CSSOM scroll APIs.
Use smooth for an animated jump, or auto for an instant jump. Set it on html for the viewport, or on a box with overflow: auto / scroll. It is not inherited. The initial value is auto.
Baseline · Widely available.
Not deprecated. User agents may ignore it. Wheel, touch, and scrollbar dragging are not affected — only navigational scrolls are.
scrollTo({ behavior: "smooth" }) / scrollIntoView({ behavior: "smooth" }) set behavior in the API call. CSS still helps when the default is used.
ua
Browsers may ignore it
The spec allows user agents to ignore scroll-behavior. Treat smooth scrolling as progressive enhancement.
Compatibility
Browser Support
scroll-behavior is a browser CSS property for scrolling boxes. Node.js, Deno, and Bun do not apply it.
✓ Baseline · Widely available
scroll-behavior
Chrome 61+, Edge 79+, Firefox 36+, Safari 15.4+ / iOS 15.4+. Not supported in Internet Explorer.
97%Global support
Google Chrome61+
Full support
Mozilla Firefox36+
Full support
Apple Safari15.4+
Full support
Microsoft Edge79+
Full support
Opera48+
Full support
Samsung Internet8.2+
Full support
Internet ExplorerNo support
No support
scroll-behaviorWidely supported
Bottom line: Safe for modern sites as progressive enhancement. Always offer instant scrolling when reduced motion is preferred. This is not a JavaScript runtime API.
Where: set on html for the page, or on an overflow scroll container.
Not for wheel/touch. Only navigation (and some CSSOM) scrolls use it.
Accessibility: reset to auto under prefers-reduced-motion: reduce.
One line:scroll-behavior: smooth softens anchor jumps — never the mouse wheel.
Frequently Asked Questions
It controls whether navigational scrolls jump instantly (auto) or animate smoothly (smooth). It applies to scrolling boxes such as the viewport or an overflow: auto container.
No. User-driven scrolling (wheel, trackpad, touch, scrollbar drag) is not affected. Only navigation scrolls and certain CSSOM scrolls are.
Set it on the html (root) element. Specifying it on body alone does not apply it to the viewport.
The initial value is auto, which scrolls instantly with no animation.
Enable smooth scrolling only when the user has no reduced-motion preference, or reset scroll-behavior to auto inside @media (prefers-reduced-motion: reduce).
It is Baseline Widely available: Chrome 61+, Edge 79+, Firefox 36+, Safari 15.4+. It is a browser CSS property, not a Node.js feature. Internet Explorer does not support it.