![]() |
VOOZH | about |
Bootstrap 5 Overflow provides utility classes to manage overflow behavior within elements. Options include auto, hidden, visible, and scroll, allowing control over content display in constrained spaces, ensuring a better user experience and layout management.
Overflow Classes in Bootstrap:
| Class Name | Description |
|---|---|
| overflow-auto | Allows overflowing elements inside a div. |
| overflow-hidden | Forbids overflow of elements within a div. |
| overflow-visible | Allows components inside the div to overflow. |
| overflow-scroll | Enables overflow with the assistance of a scrollbar. |
Syntax:
<div class="overflow-*">...</div>Here, * will be the variable that could be replaced from the above-mentioned classes.
Example 1: Using .overflow-auto and .overflow-hidden classes in div.
Output:
Example 2: Using .overflow-visible and .overflow-scroll classes in div.
Output: