Overscroll Behavior

    Utilities for controlling how the browser behaves when reaching the boundary of a scrolling area.

    Use to prevent scrolling in the target area from triggering scrolling in the parent element, but preserve “bounce” effects when scrolling past the end of the container in operating systems that support it.

    Overscroll Behavior - 图2

    Use to make it possible for the user to continue scrolling a parent scroll area when they reach the boundary of the primary scroll area.


    For a complete list of all available state modifiers, check out the documentation.

    You can also use variant modifiers to target media queries like responsive breakpoints, dark mode, prefers-reduced-motion, and more. For example, use md:overscroll-contain to apply the utility at only medium screen sizes and above.

    To learn more, check out the documentation on , Dark Mode and .