{"id":283666,"date":"2021-09-14T02:39:11","date_gmt":"2021-09-14T09:39:11","guid":{"rendered":"http:\/\/css-tricks.com\/?page_id=283666"},"modified":"2022-09-12T15:15:26","modified_gmt":"2022-09-12T22:15:26","slug":"overscroll-behavior","status":"publish","type":"page","link":"https:\/\/css-tricks.com\/almanac\/properties\/o\/overscroll-behavior\/","title":{"rendered":"overscroll-behavior"},"content":{"rendered":"\n
The In other words, it specifies how the browser behaves when reaching the boundary of a scrolling area.<\/p>\n\n\n\n Scroll chaining<\/strong><\/dfn> is when scrolling is propagated from one scroll container to an ancestor scroll container. You can see this effect in following video:<\/p>\n\n\n\noverscroll-behavior<\/code> CSS property controls whether an element will use \u201cscroll chaining\u201d or not. You have likely experienced this behavior before and perhaps took it for granted that scrolling works like this on the web! If you are inside of an element that has its own scrolling (say it\u2019s vertical) and you have scrolled down to the bottom of it, then by default, the next parent element up (maybe the page itself) starts to scroll in that direction. If you don\u2019t want that default,
overscroll-behavior<\/code> is what controls it.<\/p>\n\n\n\n
.stop-scroll-chaining {\n overscroll-behavior: contain; \/* or \"none\" *\/\n}<\/code><\/pre>\n\n\n\n
overscroll-behavior<\/code> is a shorthand for
overscroll-behavior-x<\/code> and
overscroll-behavior-y<\/code> and it is defined in the CSS Overscroll Behavior Module Level 1 Specification<\/a> which is currently in Editor\u2019s Draft status.<\/p>\n\n\n\n\n\n\n
Scroll chaining and overscroll affordances<\/h3>\n\n\n