![]() |
VOOZH | about |
Bootstrap 5 Close button is used to add more user access and enhance user experience to a website and its components. Generally, the default version of this button is dark/black and it goes universally with all the colors except the dark/black colored background or component which goes well and looks distinctive over this dark or black background.
Bootstrap 5 Close button white variant Class:
Bootstrap 5 Close button white variant used attributes:
Syntax:
<button type="button" class="btn-close btn-close-white">
...
</button>
Example 1: The code example below demonstrates a dismissing alert which is in dark color with a white close button.
Output:
Example 2: The code example below demonstrates a simple modal which is in dark color with a white close button:
Output:
Reference:https://getbootstrap.com/docs/5.0/components/close-button/#white-variant