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.
It is documented as part of the CSS Scroll Anchoring specification.
Syntax
/* Usage Example */
.chat-window {
/* Prevents the scroll position from jumping when new messages load */
overflow-anchor: auto;
}
/* Syntax */
overflow-anchor: auto;
overflow-anchor: none;
/* Global values */
overflow-anchor: inherit;
overflow-anchor: initial;
overflow-anchor: revert;
overflow-anchor: revert-layer;
overflow-anchor: unset;
overflow-anchor Browser support
Limited availability
Since
2020 82% global usage
This feature is not Baseline because it does not work in some of the most widely-used browsers.
56+
66+
preview+
79+