The overflow-anchor
property makes it possible to turn off scroll anchoring.
Scroll anchoring is a feature in the browser that prevents a viewable area that is scrolled into focus to move when new content is loaded above. This is typically a problem on a slow connection if the user scrolls down and starts reading before the page is fully loaded.
Default value: | auto |
---|---|
Inherited: | no |
Animatable: | no. Read about animatable |
Version: | CSS3 |
JavaScript syntax: | object.style.overflowAnchor="none" Try it |
The numbers in the table specify the first browser version that fully supports the property.
Property | |||||
---|---|---|---|---|---|
overflow-anchor | 56.0 | 79.0 | 66.0 | Not supported | 43.0 |
overflow-anchor: auto|none|initial|inherit;
Value | Description |
---|---|
auto | Default value. Scroll anchoring is enabled |
none | Scroll anchoring is disabled |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
CSS tutorial: CSS Overflow
CSS overflow property: CSS Overflow property
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!