Proprietà CSS overscroll-behavior-y
- Pagina precedente overscroll-behavior-x
- Pagina successiva padding
Definition and Usage
overscroll-behavior-y
The property is used to close the scroll chain or over-scroll feedback when attempting to scroll beyond the scroll boundaries in the y-direction.
Scroll chainMeans that over-scrolling on an element will cause the parent element's scroll behavior. This is the default behavior.
Over-scrollFeedback is the visual feedback given when the user tries to scroll beyond the scroll boundaries. For example, on mobile devices, when trying to scroll beyond the top of the page, the page refresh is usually accompanied by visual feedback.
Example
Close the scroll chain of the scrollable <div> element:
#yellowDiv { overscroll-behavior-y: contain; }
CSS Syntax
overscroll-behavior-y: auto|contain|none|initial|inherit;
Property value
Value | Description |
---|---|
auto | Allows scroll chain and over-scroll feedback behavior. Default value. |
contain | Allows over-scroll feedback behavior but does not allow scroll chain. |
none | Does not allow over-scroll feedback or scroll chain behavior. |
initial | Sets this property to its default value. See initial. |
inherit | Inherits this property from its parent element. See inherit. |
Technical details
Default value: | auto |
---|---|
Inheritance: | No |
Animation creation: | Not supported. See:Animation-related properties. |
Version: | CSS3 |
JavaScript Syntax: | object.style.overscrollBehaviorY="none" |
Browser Support
The numbers in the table represent the first browser version that fully supports this property.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
63.0 | 18.0 * | 59.0 | 16.0 | 50.0 |
* In Microsoft Edge, the property value none is treated as contain, which is incorrect.
Pagine correlate
Riferimento:Proprietà CSS overscroll-behavior
Riferimento:Proprietà CSS overscroll-behavior-block
Riferimento:Proprietà CSS overscroll-behavior-inline
Riferimento:Proprietà CSS overscroll-behavior-x
Riferimento:Proprietà CSS scroll-behavior
Riferimento:Proprietà CSS scroll-margin
Riferimento:Proprietà CSS scroll-padding
Riferimento:Proprietà CSS scroll-snap-align
- Pagina precedente overscroll-behavior-x
- Pagina successiva padding