CSS Property: background-origin
[this page | pdf | back links]
The CSS (CSS3) background-origin property specifies
where the background image for an element is positioned. If the background-attachment
property is set to "fixed" then the background-origin property has no
effect.
Valid property values
(other than inherit
and initial) are:
|
Value
|
Description
|
|
border-box
|
Background image starts
from the upper-left corner of the border
|
|
content-box
|
Background image starts
from the upper-left corner of the content
|
|
padding-box
|
(default value).
Background image starts from the upper-left corner of the padding edge
|
|
Default Value:
|
padding-box
|
|
JavaScript syntax:
|
e.g. object.style.backgroundOrigin="content-box"
|
|
Inherited:
|
No
|
|
Animatable:
|
No
|
NAVIGATION LINKS
Contents | Prev | Next | CSS Properties