HTML and CSS Reference
In-Depth Information
Examples
<div style="-webkit-background-origin: border;
-moz-background-origin: border;
background-origin: border;">
background-origin: border
</div>
<div style="-webkit-background-origin: padding;
-moz-background-origin: padding;
background-origin: padding;">
background-origin: padding
</div>
<div style="-webkit-background-origin: content;
-moz-background-origin: content;
background-origin: content;">
background-origin: content
</div>
O
NLINE
http://htmlref.com/ch6/backgroundorigin.html
Compatibility
CSS3
Chrome 3+, Firefox 3.5+, Safari 3+
Notes
• Mozilla-based browsers such as Firefox support this property as
-moz-
background-origin
and WebKit-based browsers such as Chrome and Safari
support it as
-webkit-background-origin
.
• The CSS3 specification currently lists
border-box
and
padding-box
. This syntax
was changed in other areas of the specification, and browser vendors currently
don't support such values. The supported values are presented instead.
background-position-x
This property defines the x-coordinate of the
background-position
property.
Syntax
background-position-x:
length
|
percentage
| left | center | right
Example
<div style="background-image: url(background.gif);
background-repeat: no-repeat;
background-position-x: 100px; background-position-y: 25px;">
background-position-x
</div>
Compatibility
No spec
Chrome 2+, IE 4+, Safari 1.3+