指定背景的绘制区域:
background-clip 属性设置或返回背景的绘制区域。
Internet Explorer 9+、Firefox、Opera、Chrome 和 Safari 支持 backgroundClip 属性。
注意:Internet Explorer 8 及其之前的版本不支持 backgroundClip 属性。
返回 backgroundClip 属性:
设置 backgroundClip 属性:
| 值 | 描述 |
|---|---|
| border-box | 默认值。背景按边界框进行剪裁。 |
| padding-box | 背景按填充框进行剪裁。 |
| content-box | 背景按内容框进行剪裁。 |
| initial | 设置该属性为它的默认值。请参阅 initial。 |
| inherit | 从父元素继承该属性。请参阅 inherit。 |
| 默认值: | border-box |
|---|---|
| 返回值: | 字符串,表示元素的 background-clip 属性。 |
| CSS 版本 | CSS3 |
CSS 参考手册:background-clip 属性