Style backgroundClip attribute
- Página anterior backgroundRepeat
- Próxima página backgroundOrigin
- Voltar para a camada superior Objeto Style HTML DOM
Definition and usage
backgroundClip
Sets or returns the drawing area of the background attribute.
See also:
HTML Styles:background property
CSS Tutorial:Fundo CSS
CSS3 Tutorial:CSS3 Background
CSS Reference Manual:background-clip property
Example
Specify the drawing area of the background:
document.getElementById("myDIV").style.backgroundClip = "content-box";
Syntax
Return the backgroundClip property:
object.style.backgroundClip
Set the backgroundClip property:
object.style.backgroundClip = "border-box|padding-box|content-box|initial|inherit"
Attribute value
Value | Description |
---|---|
border-box | Default value. The background is clipped to the border box (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. See initial. |
inherit | Inherits this property from its parent element. See inherit. |
Technical details
Default value: | border-box |
---|---|
Return value: | A string representing the background-clip property. |
CSS version: | CSS3 |
Browser support
backgroundClip
It is a CSS3 (1999) feature.
All browsers fully support it:
Chrome | Edge | Firefox | Safari | Opera | IE |
---|---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera | IE |
Suporte | Suporte | Suporte | Suporte | Suporte | 11 |
- Página anterior backgroundRepeat
- Próxima página backgroundOrigin
- Voltar para a camada superior Objeto Style HTML DOM