CSS background-position property
The background-position
property defines the original position of the background image. It can contain keyword values — top
, bottom
, left
, or right
— specifying the edge of the element's box to which you want to place the background. When we only use one value, the browser assumes the other value sets to center.
In the two-value notation, the first value represents the horizontal position, and the second represents the vertical. For example, the declaration background-position: bottom left;
means the object will be placed at bottom-left corner.
You can also use length (px
, pt
, cm
) or percentage values for defining the background position and combine them to further specify the coordinates.[1]