<div> <p class="d-none d-lg-block">Visible on large screens</p> <p class="d-block d-lg-none">Visible on small screens</p> </div>
The first paragraph has d-none which hides it by default, but d-lg-block makes it visible as block on large screens (≥992px). The second paragraph is block by default but hidden on large screens with d-lg-none. So on large screens, only the first paragraph is visible.
d-md-none hides the element on medium screens and up, but d-lg-block overrides that to show it as block on large screens. So the element is hidden only on medium screens.
d-flex in Bootstrap?d-flex do to an element?The d-flex class sets display: flex; on the element, enabling flexbox layout which helps arrange child elements in flexible ways.
d-sm-none hides on small screens and up.d-block makes the element visible by default (extra small screens). d-sm-none hides it on small screens (≥576px) and larger. So the element is visible only on extra small screens.
The visually-hidden class hides the element visually but keeps it available to screen readers. d-none hides it completely from all users including screen readers.