Skip to content
On this page

圆角

用于控制元素边框半径的工具。

Class
属性Properties
rounded-radius-noneborder-radius: 0px;
rounded-radius-smborder-radius: 2px;
rounded-radius-regular 默认border-radius: 4px;
rounded-radius-mdborder-radius: 6px;
rounded-radius-lgborder-radius: 8px;
rounded-radius-xlborder-radius: 10px;
rounded-radius-circleborder-radius: 50%;
rounded-radius-fullborder-radius: 999px;
rounded-s-radius-smborder-start-start-radius: 2px;
border-end-start-radius: 2px;
rounded-s-radius-regularborder-start-start-radius: 4px;
border-end-start-radius: 4px;
rounded-s-radius-mdborder-start-start-radius: 6px;
border-end-start-radius: 6px;
rounded-s-radius-lgborder-start-start-radius: 8px;
border-end-start-radius: 8px;
rounded-s-radius-xlborder-start-start-radius: 10px;
border-end-start-radius: 10px;
rounded-s-radius-fullborder-start-start-radius: 999px;
border-end-start-radius: 999px;
rounded-e-radius-smborder-start-end-radius: 2px;
border-end-end-radius: 2px;
rounded-e-radius-regularborder-start-end-radius: 4px;
border-end-end-radius: 4px;
rounded-e-radius-mdborder-start-end-radius: 6px;
border-end-end-radius: 6px;
rounded-e-radius-lgborder-start-end-radius: 8px;
border-end-end-radius: 8px;
rounded-e-radius-xlborder-start-end-radius: 10px;
border-end-end-radius: 10px;
rounded-e-radius-fullborder-start-end-radius: 999px;
border-end-end-radius: 999px;
rounded-t-radius-smborder-top-left-radius: 2px;
border-top-right-radius: 2px;
rounded-t-radius-regularborder-top-left-radius: 4px;
border-top-right-radius: 4px;
rounded-t-radius-mdborder-top-left-radius: 6px;
border-top-right-radius: 6px;
rounded-t-radius-lgborder-top-left-radius: 8px;
border-top-right-radius: 8px;
rounded-t-radius-xlborder-top-left-radius: 10px;
border-top-right-radius: 10px;
rounded-t-radius-fullborder-top-left-radius: 999px;
border-top-right-radius: 999px;
rounded-b-radius-smborder-bottom-left-radius: 2px;
border-bottom-right-radius: 2px;
rounded-b-radius-regularborder-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
rounded-b-radius-mdborder-bottom-left-radius: 6px;
border-bottom-right-radius: 6px;
rounded-b-radius-lgborder-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
rounded-b-radius-xlborder-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
rounded-b-radius-fullborder-bottom-left-radius: 999px;
border-bottom-right-radius: 999px;
rounded-l-radius-smborder-top-left-radius: 2px;
border-bottom-left-radius: 2px;
rounded-l-radius-regularborder-top-left-radius: 4px;
border-bottom-left-radius: 4px;
rounded-l-radius-mdborder-top-left-radius: 6px;
border-bottom-left-radius: 6px;
rounded-l-radius-lgborder-top-left-radius: 8px;
border-bottom-left-radius: 8px;
rounded-l-radius-xlborder-top-left-radius: 10px;
border-bottom-left-radius: 10px;
rounded-l-radius-fullborder-top-left-radius: 999px;
border-bottom-left-radius: 999px;
rounded-r-radius-smborder-top-right-radius: 2px;
border-bottom-right-radius: 2px;
rounded-r-radius-regularborder-top-right-radius: 4px;
border-bottom-right-radius: 4px;
rounded-r-radius-mdborder-top-right-radius: 6px;
border-bottom-right-radius: 6px;
rounded-r-radius-lgborder-top-right-radius: 8px;
border-bottom-right-radius: 8px;
rounded-r-radius-xlborder-top-right-radius: 10px;
border-bottom-right-radius: 10px;
rounded-r-radius-fullborder-top-right-radius: 999px;
border-bottom-right-radius: 999px;
rounded-ss-radius-smborder-start-start-radius: 2px;
rounded-ss-radius-regularborder-start-start-radius: 4px;
rounded-ss-radius-mdborder-start-start-radius: 6px;
rounded-ss-radius-lgborder-start-start-radius: 8px;
rounded-ss-radius-xlborder-start-start-radius: 10px;
rounded-ss-radius-fullborder-start-start-radius: 999px;
rounded-se-radius-smborder-start-end-radius: 2px;
rounded-se-radius-regularborder-start-end-radius: 4px;
rounded-se-radius-mdborder-start-end-radius: 6px;
rounded-se-radius-lgborder-start-end-radius: 8px;
rounded-se-radius-xlborder-start-end-radius: 10px;
rounded-se-radius-fullborder-start-end-radius: 999px;
rounded-es-radius-smborder-end-start-radius: 2px;
rounded-es-radius-regularborder-end-start-radius: 4px;
rounded-es-radius-mdborder-end-start-radius: 6px;
rounded-es-radius-lgborder-end-start-radius: 8px;
rounded-es-radius-xlborder-end-start-radius: 10px;
rounded-es-radius-fullborder-end-start-radius: 999px;
rounded-ee-radius-smborder-end-end-radius: 2px;
rounded-ee-radius-regularborder-end-end-radius: 4px;
rounded-ee-radius-mdborder-end-end-radius: 6px;
rounded-ee-radius-lgborder-end-end-radius: 8px;
rounded-ee-radius-xlborder-end-end-radius: 10px;
rounded-ee-radius-fullborder-end-end-radius: 999px;
rounded-tl-radius-smborder-top-left-radius: 2px;
rounded-tl-radius-regularborder-top-left-radius: 4px;
rounded-tl-radius-mdborder-top-left-radius: 6px;
rounded-tl-radius-lgborder-top-left-radius: 8px;
rounded-tl-radius-xlborder-top-left-radius: 10px;
rounded-tl-radius-fullborder-top-left-radius: 999px;
rounded-tr-radius-smborder-top-right-radius: 2px;
rounded-tr-radius-regularborder-top-right-radius: 4px;
rounded-tr-radius-mdborder-top-right-radius: 6px;
rounded-tr-radius-lgborder-top-right-radius: 8px;
rounded-tr-radius-xlborder-top-right-radius: 10px;
rounded-tr-radius-fullborder-top-right-radius: 999px;
rounded-bl-radius-smborder-bottom-left-radius: 2px;
rounded-bl-radius-regularborder-bottom-left-radius: 4px;
rounded-bl-radius-mdborder-bottom-left-radius: 6px;
rounded-bl-radius-lgborder-bottom-left-radius: 8px;
rounded-bl-radius-xlborder-bottom-left-radius: 10px;
rounded-bl-radius-fullborder-bottom-left-radius: 999px;
rounded-br-radius-smborder-bottom-right-radius: 2px;
rounded-br-radius-regularborder-bottom-right-radius: 4px;
rounded-br-radius-mdborder-bottom-right-radius: 6px;
rounded-br-radius-lgborder-bottom-right-radius: 8px;
rounded-br-radius-xlborder-bottom-right-radius: 10px;
rounded-br-radius-fullborder-bottom-right-radius: 999px;

基本示例

使用 rounded-* 工具将不同大小的圆角应用于元素。

rounded-radius-regular
rounded-radius-md
rounded-radius-lg
rounded-radius-full
html
<div class="rounded-radius-regular ..."></div>
<div class="rounded-radius-md ..."></div>
<div class="rounded-radius-lg ..."></div>
<div class="rounded-radius-full ..."></div>

分别圆边

使用 rounded-t-*、rounded-r-*、rounded-b-* 和 rounded-l-* 工具仅舍入元素的一侧。

rounded-t-radius-lg
rounded-r-radius-lg
rounded-b-radius-lg
rounded-l-radius-lg
html
<div class="rounded-t-radius-lg ..."></div>
<div class="rounded-r-radius-lg ..."></div>
<div class="rounded-b-radius-lg ..."></div>
<div class="rounded-l-radius-lg ..."></div>

分别圆角

使用 rounded-tl-*、rounded-tr-*、rounded-br-* 和 rounded-bl-* 工具仅圆化元素的一个角。

rounded-tl-radius-lg
rounded-tr-radius-lg
rounded-br-radius-lg
rounded-bl-radius-lg
html
<div class="rounded-tl-radius-lg ..."></div>
<div class="rounded-tr-radius-lg ..."></div>
<div class="rounded-br-radius-lg ..."></div>
<div class="rounded-bl-radius-lg ..."></div>

使用逻辑属性

使用 rounded-s-*、 rounded-e-*、rounded-ss-*、rounded-se-*、rounded-es-* 和 rounded-ee-* 工具使用 逻辑属性 设置边框半径,该半径根据文本方向映射到相应的角。

Left-to-right
Right-to-left
html
<div dir="ltr">
  <div class="rounded-s-radius-lg ..."></div>
</div>

<div dir="rtl">
  <div class="rounded-s-radius-lg ..."></div>
</div>