EN
이 콘텐츠는 한국어로 제공되지 않아 영어 버전으로 표시됩니다.

background-origin property

Specifies the positioning area of an element or multiple elements.

CSS Backgrounds and Borders Module Level 3, Section 3.8Internet Explorer 9

 

Syntax

background-origin: padding-box | border-box | content-box

Property values

A variable of type String that specifies or receives the position of the box or boxes.

padding-box

Initial value. The position is relative to the padding box. For single boxes, "0 0" is the upper-left corner of the padding edge; "100% 100%" is the lower-right corner.

border-box

The position is relative to the border box.

content-box

The position is relative to the content box.

CSS information

Applies ToAll elements
Mediavisual
Inheritedno
Initial Valuepadding-box

Standards information

Remarks

For elements rendered as a single box, the background-origin property specifies the background positioning area. For elements rendered as multiple boxes (for instance, inline boxes on several lines or boxes on several pages), this property specifies which boxes determine the background positioning areas.

If the background-attachment value for an image element is "fixed", then the background-origin property has no effect. In this case, the background positioning area is the initial containing block.

Starting in Windows Internet Explorer 9, 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.

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

See also

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

 

 

표시:
© 2014 Microsoft