スタイルbackgroundClipプロパティ
例
背景のペイント領域を指定します。
document.getElementById("myDIV").style.backgroundClip = "content-box";
定義と使用法
backgroundClipプロパティは、背景のペイント領域を設定または返します。
ブラウザのサポート
表の数字は、プロパティを完全にサポートする最初のブラウザバージョンを示しています。
Property | |||||
---|---|---|---|---|---|
backgroundClip | 4.0 | 9.0 | 4.0 | 3.0 | 10.5 |
構文
backgroundClipプロパティを返します。
object.style.backgroundClip
backgroundClipプロパティを設定します。
object.style.backgroundClip = "border-box|padding-box|content-box|initial|inherit"
プロパティ値
Value | Description |
---|---|
border-box | Default value. The background is clipped to the border box |
padding-box | The background is clipped to the padding box |
content-box | The background is clipped to the content box |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
技術的な詳細
デフォルト値: | ボーダーボックス |
---|---|
戻り値: | 要素のbackground-clipプロパティを表す文字列 |
CSSバージョン | CSS3 |
関連ページ
CSSリファレンス:background-clipプロパティ