HomeMenu
Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

background-position-x

Description

The background-position-x property for CSS specifies the background position’s horizontal component.

Syntax

CSS

background-position-x: value;

JS

object.style.backgroundPositionX = "value";

Values

<'background-position-x'> = [ center | [ [ left | right | x-start | x-end ]? <length-percentage>? ]! ]#
center

left

right

x-start

x-end

<length-percentage> =
    <length> |
    <percentage>
<length>

Specifies the length using a number followed by a unit of measurement.

<percentage>

Specifies the percentage using a number followed by a percent sign (%).

Initial

0%

Examples

1 · center

2 · left

3 · length

4 · percentage

5 · right

6 · x-end

7 · x-start

8 · JS