CSS3 background-clip 屬性
實例
指定繪圖區的背景:
div
{
background-color:yellow;
background-clip:content-box;
}
流覽器支持
表格中的數字表示支持該屬性的第一個流覽器版本號。
| 屬性 | |||||
|---|---|---|---|---|---|
| background-clip | 4.0 | 9.0 | 4.0 | 3.0 | 10.5 |
標籤定義及使用說明
background-clip屬性指定背景繪製區域。
| 默認值: | border-box |
|---|---|
| 繼承: | no |
| 版本: | CSS3 |
| JavaScript 語法: | object object.style.backgroundClip="content-box" |
語法
background-clip: border-box|padding-box|content-box;
| 值 | 說明 |
|---|---|
| border-box | 默認值。背景繪製在邊框方框內(剪切成邊框方框)。 |
| padding-box | 背景繪製在襯距方框內(剪切成襯距方框)。 |
| content-box | 背景繪製在內容方框內(剪切成內容方框)。 |
相關文章
CSS3 教學: CSS3 背景
