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

Sizes

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

Borders - 图5

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