Name

background-position

Synopsis

This property sets the position of the background’s origin image (as defined by background-image); this is the point from which any background repetition will occur.

Values:

[[<percentage> | <length> | left | center | right] [<percentage>] | <length> | top | center | bottom]?] | [[left | center | right] || [top | center | bottom]] | inherit

Initial value:

0% 0%

Applies to:

block-level and replaced elements

Inherited:

no

Percentages:

refer to the corresponding point on both the element and the origin image

Computed value:

the absolute length offsets, if <length> is specified; otherwise, percentage values

Get Cascading Style Sheets: The Definitive Guide, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.