![]() |
VOOZH | about |
Bootstrap 5 Borders offer predefined border styles to elements. Classes like .border, .border-0, .border-top, .border-bottom, .border-left, and .border-right provide easy customization for borders, including color, width, and radius, enhancing UI design.
Bootstrap 5 Borders:
| Property | Description |
|---|---|
| Border | Classifies into additive and subtractive. Additive adds borders, subtractive removes. |
| Border Color | Utilizes theme colors to change border color. |
| Border Width | Increases or decreases border width. |
| Border Radius | Utilizes rounded classes for rounded corners. |
| Sass | Supports language extensions like variables, utility API, and mixins. |
Example 1: This code demonstrates the different border sizes as shown below. The class "border border-4" means "border-4" size is applied to all the sides and so on.
Output:
Example 2: This code demonstrates different border colors using the relevant classes.
Output:
Reference: https://getbootstrap.com/docs/5.0/utilities/borders/