![]() ![]() overscroll-behavior-xĪs the name suggests, the overscroll-behavior-x CSS property allows you to control the browser’s behavior when the horizontal boundary of a scrolling area is reached. We mentioned it earlier, but over scroll-behavior is shorthand for two other CSS properties, which call the “constituent properties” of the shorthand. unset: Removes the current overscroll-behavior from the element.inherit: Adopts the overscroll-behavior value of the parent.initial: Applies the property’s default setting, which is auto.So, you won’t get that Android overscroll glow or iOS rubber-banding effect. ![]() none: Prevents scroll chaining and also prevents overscroll affordances.Scrolls do not propagate to ancestors (the other elements in a parent container) but preserve overscroll affordances like “bounce” effects when scrolling past the end of the container in operating systems that support it. In other words, it allows scroll chaining and overscroll affordances. Specifies that the browser should perform the default boundary action, and makes it possible for the user to continue scrolling through a parent scroll area when the boundary of the primary scroll area has been reached. Computed value: as each of the properties of the shorthand.Applies to: non-replaced block-level elements and non-replaced inline-block elements.In other words, it specifies how the browser behaves when reaching the boundary of a scrolling area.stop-scroll-chaining If you don’t want that default, overscroll-behavior is what controls it. 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’s 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. The overscroll-behavior CSS property controls whether an element will use “scroll chaining” or not.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |