# background-clip

background-clip 属性用于设置元素的背景(背景图片或颜色)是否延伸到边框区域、内边距区域、内容区域下面。

# uni-app x 兼容性

Web Android iOS HarmonyOS HarmonyOS(Vapor)
4.0 3.9 x x x

# 语法

background-clip: <box>#;

# 值限制

  • enum

# background-clip 的属性值

名称 兼容性 描述
border-box
背景延伸到边框区域,被边框覆盖
padding-box
背景延伸到内边距(padding)区域,不会绘制到边框区域
content-box
背景仅绘制到内容区(content box)区域

# 默认值

border-box

# 参见