Skip to content

Border Width

<https://www.tailwindcss.cn/docs/border-width>

用法

ClassProperties
border-0border-width: 0px;
border-2border-width: 2px;
border-4border-width: 4px;
border-8border-width: 8px;
borderborder-width: 1px;
border-x-0border-left-width: 0px; border-right-width: 0px;
border-x-2border-left-width: 2px;border-right-width: 2px;
border-x-4border-left-width: 4px;border-right-width: 4px;
border-x-8border-left-width: 8px;border-right-width: 8px;
border-xborder-left-width: 1px;border-right-width: 1px;
border-y-0border-top-width: 0px;border-bottom-width: 0px;
border-y-2border-top-width: 2px; border-bottom-width: 2px;
border-y-4border-top-width: 4px; border-bottom-width: 4px;
border-y-8border-top-width: 8px; border-bottom-width: 8px;
border-yborder-top-width: 1px; border-bottom-width: 1px;
border-s-0border-inline-start-width: 0px;
border-s-2border-inline-start-width: 2px;
border-s-4border-inline-start-width: 4px;
border-s-8border-inline-start-width: 8px;
border-sborder-inline-start-width: 1px;
border-e-0border-inline-end-width: 0px;
border-e-2border-inline-end-width: 2px;
border-e-4border-inline-end-width: 4px;
border-e-8border-inline-end-width: 8px;
border-eborder-inline-end-width: 1px;
border-t-0border-top-width: 0px;
border-t-2border-top-width: 2px;
border-t-4border-top-width: 4px;
border-t-8border-top-width: 8px;
border-tborder-top-width: 1px;
border-r-0border-right-width: 0px;
border-r-2border-right-width: 2px;
border-r-4border-right-width: 4px;
border-r-8border-right-width: 8px;
border-rborder-right-width: 1px;
border-b-0border-bottom-width: 0px;
border-b-2border-bottom-width: 2px;
border-b-4border-bottom-width: 4px;
border-b-8border-bottom-width: 8px;
border-bborder-bottom-width: 1px;
border-l-0border-left-width: 0px;
border-l-2border-left-width: 2px;
border-l-4border-left-width: 4px;
border-l-8border-left-width: 8px;
border-lborder-left-width: 1px;

元素之间

您还可以使用 divide-{x/y}-{width} 和 divide-{color} 实用程序在子元素之间添加边框。

html
&lt;div class="divide-y divide-slate-200 ...">
  &lt;div>01&lt;/div>
  &lt;div>02&lt;/div>
  &lt;div>03&lt;/div>
&lt;/div>

共 20 个模块,1301 篇 Markdown 文档。