![]() |
VOOZH | about |
Bootstrap 5 Border width is used to display an outline around a box and it provides style, color, and radius of an element border on the side. The border width sets the width of an element's four borders. The width can be set as a specific size by using defined values.
Bootstrap5 Border width classes used:
Syntax:
<div class="border border-*"> ... </div>
Note: Here * can be replaced by a size from 1-5.
Example 1: In this example, we set the border width of the elements in four directions by using border-1,border-2,border-3 classes
Output:
Example 2: In this example, we set the border width of the elements in four directions by using border-1, border-4, and border-5 classes.
Output:
Reference: https://getbootstrap.com/docs/5.0/utilities/borders/#border-width