Borders

Use border utilities to quickly style the border and border-radius of an element. Great for images, buttons, or any other element.

Border

Use border utilities to add or remove an element’s borders. Choose from all borders or one at a time.

Additive

Borders  - 图1

  1. <span class="border"></span>
  2. <span class="border-top"></span>
  3. <span class="border-right"></span>
  4. <span class="border-bottom"></span>
  5. <span class="border-left"></span>

Subtractive

Borders  - 图2

  1. <span class="border-0"></span>
  2. <span class="border-top-0"></span>
  3. <span class="border-right-0"></span>
  4. <span class="border-bottom-0"></span>
  5. <span class="border-left-0"></span>

Border color

Change the border color using utilities built on our theme colors.

Borders  - 图3

  1. <span class="border border-primary"></span>
  2. <span class="border border-secondary"></span>
  3. <span class="border border-success"></span>
  4. <span class="border border-danger"></span>
  5. <span class="border border-warning"></span>
  6. <span class="border border-info"></span>
  7. <span class="border border-light"></span>
  8. <span class="border border-dark"></span>
  9. <span class="border border-white"></span>

Border-radius

Add classes to an element to easily round its corners.

Borders  - 图4

  1. <img src="..." alt="..." class="rounded">
  2. <img src="..." alt="..." class="rounded-top">
  3. <img src="..." alt="..." class="rounded-right">
  4. <img src="..." alt="..." class="rounded-bottom">
  5. <img src="..." alt="..." class="rounded-left">
  6. <img src="..." alt="..." class="rounded-circle">
  7. <img src="..." alt="..." class="rounded-pill">
  8. <img src="..." alt="..." class="rounded-0">

Sizes

Use .rounded-lg or .rounded-sm for larger or smaller border-radius.

Borders  - 图5

  1. <img src="..." alt="..." class="rounded-sm">
  2. <img src="..." alt="..." class="rounded-lg">