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) (visibility: visible)

invisible

Hides an element, but it still occupies space (visibility: hidden)

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>

Try it yourself


Whereisstuff is simple learing platform for beginer to advance level to improve there skills in technologies.we will provide all material free of cost.you can write a code in runkit workspace and we provide some extrac features also, you agree to have read and accepted our terms of use, cookie and privacy policy.
© Copyright 2024 www.whereisstuff.com. All rights reserved. Developed by whereisstuff Tech.