Border Width
<https://www.tailwindcss.cn/docs/border-width>
用法
| Class | Properties |
|---|---|
| border-0 | border-width: 0px; |
| border-2 | border-width: 2px; |
| border-4 | border-width: 4px; |
| border-8 | border-width: 8px; |
| border | border-width: 1px; |
| border-x-0 | border-left-width: 0px; border-right-width: 0px; |
| border-x-2 | border-left-width: 2px;border-right-width: 2px; |
| border-x-4 | border-left-width: 4px;border-right-width: 4px; |
| border-x-8 | border-left-width: 8px;border-right-width: 8px; |
| border-x | border-left-width: 1px;border-right-width: 1px; |
| border-y-0 | border-top-width: 0px;border-bottom-width: 0px; |
| border-y-2 | border-top-width: 2px; border-bottom-width: 2px; |
| border-y-4 | border-top-width: 4px; border-bottom-width: 4px; |
| border-y-8 | border-top-width: 8px; border-bottom-width: 8px; |
| border-y | border-top-width: 1px; border-bottom-width: 1px; |
| border-s-0 | border-inline-start-width: 0px; |
| border-s-2 | border-inline-start-width: 2px; |
| border-s-4 | border-inline-start-width: 4px; |
| border-s-8 | border-inline-start-width: 8px; |
| border-s | border-inline-start-width: 1px; |
| border-e-0 | border-inline-end-width: 0px; |
| border-e-2 | border-inline-end-width: 2px; |
| border-e-4 | border-inline-end-width: 4px; |
| border-e-8 | border-inline-end-width: 8px; |
| border-e | border-inline-end-width: 1px; |
| border-t-0 | border-top-width: 0px; |
| border-t-2 | border-top-width: 2px; |
| border-t-4 | border-top-width: 4px; |
| border-t-8 | border-top-width: 8px; |
| border-t | border-top-width: 1px; |
| border-r-0 | border-right-width: 0px; |
| border-r-2 | border-right-width: 2px; |
| border-r-4 | border-right-width: 4px; |
| border-r-8 | border-right-width: 8px; |
| border-r | border-right-width: 1px; |
| border-b-0 | border-bottom-width: 0px; |
| border-b-2 | border-bottom-width: 2px; |
| border-b-4 | border-bottom-width: 4px; |
| border-b-8 | border-bottom-width: 8px; |
| border-b | border-bottom-width: 1px; |
| border-l-0 | border-left-width: 0px; |
| border-l-2 | border-left-width: 2px; |
| border-l-4 | border-left-width: 4px; |
| border-l-8 | border-left-width: 8px; |
| border-l | border-left-width: 1px; |
元素之间
您还可以使用 divide-{x/y}-{width} 和 divide-{color} 实用程序在子元素之间添加边框。
html
<div class="divide-y divide-slate-200 ...">
<div>01</div>
<div>02</div>
<div>03</div>
</div>