Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
MSDN Library
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

background-clip property

Specifies the background painting area or areas relative to the element's bounding boxes.

CSS Backgrounds and Borders Module Level 3, Section 3.7

 

Syntax

background-clip: border-box | padding-box | content-box [ , border-box | padding-box | content-box ]*

Property values

One or more of the following values, separated by commas:

border-box

Initial value. 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 ToAll elements
Mediavisual
Inheritedno
Initial Valueborder-box

Standards information

Remarks

As of Microsoft Edge, "-webkit-background-clip" is supported as an alias for this property.

If the background-attachment property value for an element is set to "fixed", the background-clip property has no effect.

Starting in a Windows Store app using JavaScript, the background of an element 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.

The background of an element 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.

As of Internet Explorer for Windows Phone 8.1 Update, Internet Explorer for Windows Phone supports "-webkit-background-clip" as an alias for this property.

See also

style
style
CSSStyleDeclaration
currentStyle
defaults
LayoutRect
runtimeStyle
style
style
style
Reference
background-color
background-image
background-repeat
background-attachment
background-position
background-origin
background-size
background

 

 

Show:
© 2015 Microsoft