css.properties

background-position-x

The background-position-x property sets the horizontal position of a background image.

Formal Syntax

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

See specification

JavaScript Access

// Access via element.style
element.style.backgroundPositionX = '0%';

Logical Property Group

This property belongs to the background-position logical property group, which includes:

Browser Support

standard | MDN ยท Spec

FeatureChromeFirefoxSafariEdge
background-position-x149112
side-relative_values1444915.4144

Related Properties