B.7. background-position-x, background-position-y

These nonstandard properties are supported only by Internet Explorer browsers, and let you individually specify the two components of the background-position property. These properties are most useful in Dynamic HTML scripting in an Internet Explorer only environment.

Inherited: No

See also: Section B.6background-position

B.7.1. Value

Both of these properties support values specified in CSS lengths and percentages. Additionally, background-position-x and background-position-y support the horizontal and vertical position constants listed in Table B-1. Important differences between positions specified with CSS length measurements, and positions specified with percentages or constants, are described under Section B.6background-position.

Initial value: 0

B.7.2. Compatibility

CSS Version: n/a

Supported by Internet Explorer 4 or later only.

B.7.3. Example

This style rule places the background image 20 pixels from the top and centered horizontally on the page:

body {
  background-position-x: center;
  background-position-y: 20px;
}

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset