GitHubopen_in_new

分隔线 ​

分隔线用于将相关内容划分为清晰的组。

分区一分区二

示例 ​

默认 ​

AccountPreferences

内缩 ​

垂直 ​

自定义间距 ​

HeaderContent

参考 ​

结构

元素部件选择器
<div>
root
[data-scope="divider"][data-part="root"]
left_click鼠标左键单击复制

属性

名称说明默认值控件
orientation可选

Direction of the divider line.

horizontalvertical
"horizontal"
inset可选

Apply inset spacing on either side of the divider.

nonestartendboth
"none"
thickness可选

Line thickness. Such as '1px' or '0.125rem'.

string | undefined
undefined
spacing可选

Symmetric space around the divider. Such as '0.75rem'.

string | undefined
undefined

样式4

Token说明
--md-divider-colorColor
回退值var(--md-sys-color-outline-variant)

Controls color.

--md-divider-insetLayout
回退值--dp(16)

Controls inset.

--md-divider-spacingStyle
回退值0

Controls spacing.

--md-divider-thicknessLayout
回退值0.0625rem

Controls thickness.