定义和用法
background-clip 属性设置或返回背景的绘制区域。
浏览器支持





Internet Explorer 9+、Firefox、Opera、Chrome 和 Safari 支持 backgroundClip 属性。
注意:Internet Explorer 8 及其之前的版本不支持 backgroundClip 属性。
语法
返回 backgroundClip 属性:
object.style.backgroundClip 
设置 backgroundClip 属性:
object.style.backgroundClip="border-box|padding-box|content-box|initial|inherit" 
属性值
| 值 | 描述 | 
|---|---|
| border-box | 默认值。背景按边界框进行剪裁。 | 
| padding-box | 背景按填充框进行剪裁。 | 
| content-box | 背景按内容框进行剪裁。 | 
| initial | 设置该属性为它的默认值。请参阅 initial。 | 
| inherit | 从父元素继承该属性。请参阅 inherit。 | 
技术细节
| 默认值: | border-box | 
|---|---|
| 返回值: | 字符串,表示元素的 background-clip 属性。 | 
| CSS 版本 | CSS3 | 
相关文章
CSS 参考手册:background-clip 属性

 Style 对象
 Style 对象