![]() |
VOOZH | about |
Bootstrap 5 Border utility is used to set the style of the border element. The border styles can be of border-color, border-width, border-radius, etc.
Border color is used to set the color of the border element using utilities built on our theme colors.
Border color used Classes:
| Class Name | Description |
|---|---|
| border-primary | Sets the primary color for the border. |
| border-secondary | Sets the secondary color for the border. |
| border-success | Sets the success color for the border. |
| border-danger | Sets the danger color for the border. |
| border-warning | Sets the warning color for the border. |
| border-info | Sets the info color for the border. |
| border-light | Sets the light color for the border. |
| border-dark | Sets the dark color for the border. |
| border-white | Sets the white color for the border. |
Syntax:
<div class="border border-*">
Content
</div>Example 1: In this example, we will add different color borders on the span elements.
Output:
Example 2: In this example, we will add different color borders with different border widths of the span elements.
Output: