overflow-anchor

A browser optimization that helps keep your scroll position steady when content is added to the page above where you're looking. It prevents the page from 'jumping' unexpectedly.

Quick example

.chat-window {
  /* Prevents the scroll position from jumping when new messages load */
  overflow-anchor: auto;
}

Quick facts

Initial value
auto
Inherited
No
Applies to
all elements
Animation type
discrete

Values

autonone

overflow-anchor Browser Support

Limited availability 82% global usage

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Not ready for production without a fallback.

56+
66+
preview+
79+
ESC