简体中文
background-clip 属性用于设置元素的背景(背景图片或颜色)是否延伸到边框区域、内边距区域、内容区域下面。
| Web | Android | iOS | HarmonyOS | HarmonyOS(Vapor) |
|---|---|---|---|---|
| 4.0 | 3.9 | x | x | x |
background-clip: <box>#;
| 名称 | 兼容性 | 描述 |
|---|---|---|
| border-box | 背景延伸到边框区域,被边框覆盖 | |
| padding-box | 背景延伸到内边距(padding)区域,不会绘制到边框区域 | |
| content-box | 背景仅绘制到内容区(content box)区域 |
border-box