边框

使用边框实用程序可以快速设置元素的边框和边框半径的样式。 非常适合图像,按钮或任何其他元素。

边框

使用边框实用程序添加或删除元素的边框。 从所有边界中选择,或一次选择一个。

添加剂(Additive)

<span class="border"></span>
<span class="border-top"></span>
<span class="border-right"></span>
<span class="border-bottom"></span>
<span class="border-left"></span>

减法(Subtractive)

<span class="border-0"></span>
<span class="border-top-0"></span>
<span class="border-right-0"></span>
<span class="border-bottom-0"></span>
<span class="border-left-0"></span>

边框颜色(Border color)

使用基于我们主题颜色的实用工具更改边框颜色。

<span class="border border-primary"></span>
<span class="border border-secondary"></span>
<span class="border border-success"></span>
<span class="border border-danger"></span>
<span class="border border-warning"></span>
<span class="border border-info"></span>
<span class="border border-light"></span>
<span class="border border-dark"></span>
<span class="border border-white"></span>

边界半径(Border-radius)

向元素添加类可轻松实现其转角。

Example rounded image75x75Example top rounded image75x75Example right rounded image75x75Example bottom rounded image75x75Example left rounded image75x75Completely round image75x75Rounded pill image150x75Example non-rounded image (overrides rounding applied elsewhere)75x75
<img src="..." alt="..." class="rounded">
<img src="..." alt="..." class="rounded-top">
<img src="..." alt="..." class="rounded-right">
<img src="..." alt="..." class="rounded-bottom">
<img src="..." alt="..." class="rounded-left">
<img src="..." alt="..." class="rounded-circle">
<img src="..." alt="..." class="rounded-pill">
<img src="..." alt="..." class="rounded-0">

尺码(Sizes)

对于更大或更小的边框半径,请使用.rounded-lg或.rounded-sm。

Example small rounded image75x75Example large rounded image75x75
<img src="..." alt="..." class="rounded-sm">
<img src="..." alt="..." class="rounded-lg">