overscroll-behavior-y
Quick Summary for overscroll-behavior-y
The
overscroll-behavior-y
CSS property sets the browser's behavior when the vertical boundary of a scrolling area is reached.
Code Usage for overscroll-behavior-y
/* Keyword values */ overscroll-behavior-y: auto; /* default */ overscroll-behavior-y: contain; overscroll-behavior-y: none; /* Global values */ overscroll-behavior-y: inherit; overscroll-behavior-y: initial; overscroll-behavior-y: revert; overscroll-behavior-y: unset;
More Details for overscroll-behavior-y
overscroll-behavior-y
The overscroll-behavior-y
CSS property sets the browser's behavior when the vertical boundary of a scrolling area is reached.
See overscroll-behavior
for a full explanation.
/* Keyword values */ overscroll-behavior-y: auto; /* default */ overscroll-behavior-y: contain; overscroll-behavior-y: none; /* Global values */ overscroll-behavior-y: inherit; overscroll-behavior-y: initial; overscroll-behavior-y: revert; overscroll-behavior-y: unset;
Syntax
The overscroll-behavior-y
property is specified as a keyword chosen from the list of values below.
Values
auto
The default scroll overflow behavior occurs as normal.
contain
Default scroll overflow behavior is observed inside the element this value is set on (e.g. "bounce" effects or refreshes), but no scroll chaining occurs to neighboring scrolling areas, e.g. underlying elements will not scroll.
none
No scroll chaining occurs to neighboring scrolling areas, and default scroll overflow behavior is prevented.
Formal definition
Initial value | auto |
---|---|
Applies to | non-replaced block-level elements and non-replaced inline-block elements |
Inherited | no |
Computed value | as specified |
Animation type | discrete |
Formal syntax
contain | none | auto
Examples
Preventing an underlying element from scrolling vertically
.messages { height: 220px; overflow: auto; overscroll-behavior-y: contain; }
See overscroll-behavior
for a full example and explanation.
Specifications
Specification |
---|
CSS Overscroll Behavior Module Level 1 # overscroll-behavior-longhands-physical |
See also
Take control of your scroll: customizing pull-to-refresh and overflow effects The mapped logical properties:overscroll-behavior-inline
, overscroll-behavior-block
Select your preferred language English (US)DeutschFrançais日本語中文 (简体) Change language
Posted in
12:22 am, February 22, 2022
Add Comment
Other Items in CSS
rgb()
rgba()
:right
right
@right-bottom
:root
rotate
rotate()
rotate3d()
rotateX()
rotateY()
rotateZ()
row-gap
ruby-align
ruby-position
saturate()
scale
scale()
scale3d()
scaleX()
scaleY()
scaleZ()
:scope
scroll-behavior
scroll-margin
scroll-margin-block
scroll-margin-block-end
scroll-margin-block-start
scroll-margin-bottom
scroll-margin-inline
scroll-margin-inline-end
scroll-margin-inline-start
scroll-margin-left
scroll-margin-right
scroll-margin-top
scroll-padding
scroll-padding-block
scroll-padding-block-end
scroll-padding-block-start
scroll-padding-bottom
scroll-padding-inline
scroll-padding-inline-end
scroll-padding-inline-start
scroll-padding-left
scroll-padding-right
scroll-padding-top
scroll-snap-align
scroll-snap-stop
scroll-snap-type
@scroll-timeline