这个类在顺风 CSS 中接受多个值。它是 CSS Overscroll-behavior 属性的替代品。此类用于设置到达滚动区域边界时浏览器的行为。此属性可用于防止在有多个滚动区域的页面中进行不必要的滚动。
CSS Overscroll-behavior-x和 CSS 中有单独的属性 CSS Overflow-behavior-y ,但我们将在这篇文章中介绍它。
过度滚动行为类:
- 自动滚动
- 过度滚动
- 无过度滚动
- 自动滚动
- overscroll-y-包含
- overscroll-y-none
- overscroll-x-自动
- overscroll-x-包含
- overscroll-x-无
overscroll-auto:用于将滚动行为设置为默认。即使到达元素的边界,整个页面和元素也会滚动。它是默认值。
句法:
...
例子:
HTML
GeeksforGeeks
Tailwind CSS Overscroll Class
This portal has been created to provide well
written, well thought and well explained
solutions for selected questions. An IIT
Roorkee alumnus and founder of GeeksforGeeks.
He loves to solve programming problems in
most efficient ways. Apart from GeeksforGeeks,
he has worked with DE Shaw and Co. as a
software developer and JIIT Noida as an
assistant professor.
This is a smaller element that is also
scrollable. The overscroll behavior can
be used to control if the main content
behind would scroll when this element's
vertical boundary is reached.