scroll-behavior

Sets the behavior for a scrolling box when scrolling is triggered by navigation or CSSom scrolling APIs. smooth creates a nice transition instead of an instant jump.

Quick example

html {
  scroll-behavior: smooth;
  /* enables smooth scrolling for anchor links page-wide */
}

Quick facts

Initial value
auto
Inherited
No
Applies to
scrolling boxes
Animation type
notAnimatable

Values

autosmooth

scroll-behavior Browser Support

Widely available Since 2022 95% global usage

This feature is well established and works across many devices and browser versions. It has been available across browsers since 2022.

Safe to use without fallbacks.

61+
36+
15.4+
79+
ESC