Advertisement
Google Ad Slot: content-top
Bootstrap 5 Visibility
Bootstrap 5 provides visibility utility classes to control whether an element is visible or hidden while still occupying space in the layout.
Class |
Description |
|---|---|
visible |
Makes an element visible (default state) ( |
invisible |
Hides an element, but it still occupies space ( |
Example
<div class="visible bg-primary text-white p-2">I am visible</div>
<div class="invisible bg-secondary text-white p-2">I am invisible but occupy space</div>