background-clip property
[This documentation is preliminary and is subject to change.]
Sets or retrieves the background painting area.
![]() |
Syntax
background-clip: border-box | padding-box | content-box
Property values
border-box-
Default. The background is painted within (clipped to) the border box.
padding-box-
The background is painted within (clipped to) the padding box.
content-box-
The background is painted within (clipped to) the content box.
CSS information
| Applies To | All elements |
|---|---|
| Media | visual |
| Inherited | no |
| Initial Value |
Standards information
- CSS Backgrounds and Borders Module Level 3, Section 3.7
Remarks
In a Metro style app using JavaScript, the background of a box can have multiple layers. The number of layers is determined by the number of comma-separated values in the background-image property. Each of the images is sized, positioned, and tiled according to the corresponding value in the other background properties (background-attachment, background-clip, background-origin, background-position, background-repeat, and background-size). The first image in the list is the layer closest to the user, the next one is painted behind the first, and so on.
See also
- style
- style
- CSSStyleDeclaration
- currentStyle
- defaults
- LayoutRect
- runtimeStyle
- style
- Reference
- background-color
- background-image
- background-repeat
- background-attachment
- background-position
- background-origin
- background-size
- background
Build date: 3/13/2012
