我們的志工尚未將本文翻譯為 正體中文 (繁體) 版本。加入我們,幫忙翻譯!
您也可以閱讀本文的 English (US) 版本。

The overscroll-behavior-y CSS property sets the browser's behavior when the vertical boundary of a scrolling area is reached.

Note: See overscroll-behavior for a full explanation.

/* Keyword values */
overscroll-behavior: auto; /* default */
overscroll-behavior: contain;
overscroll-behavior: none;

/* Global values */
overflow: inherit;
overflow: initial;
overflow: unset;

Initial valueauto
Applies tonon-replaced block-level elements and non-replaced inline-block elements
Inheritedno
Mediavisual
Computed valueas specified
Animation typediscrete
Canonical orderthe unique non-ambiguous order defined by the formal grammar

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 neighbouring scrolling areas, e.g. underlying elements will not scroll.
none
No scroll chaining occurs to neighbouring scrolling areas, and default scroll overflow behavior is prevented.

Formal syntax

contain | none | auto

Examples

.messages {
  height: 220px;
  overflow: auto;
  overscroll-behavior-y: contain;
} 

See overscroll-behavior for a full example and explanation.

Specifications

Specification Status Comment
Unknown
The definition of 'overscroll-behavior-y' in that specification.
Unknown  

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic supportChrome Full support 63Edge Partial support 18
Notes
Partial support 18
Notes
Notes Currently the none value incorrectly behaves as contain (allowing for the elastic bounce effect).
Firefox Full support 59IE No support NoOpera Full support 50Safari No support NoWebView Android Full support 63Chrome Android Full support 63Edge Mobile No support NoFirefox Android Full support 59Opera Android Full support 50Safari iOS No support NoSamsung Internet Android No support No

Legend

Full support  
Full support
Partial support  
Partial support
No support  
No support
See implementation notes.
See implementation notes.

See also

文件標籤與貢獻者

此頁面的貢獻者: ddbeck, Siilwyn, mfluehr, chrisdavidmills
最近更新: ddbeck,