CSS background-position Property


The background-position property sets the starting position of a background image.

Sets the initial position of the element's background image, if specified; values normally are paired to provide x, y positions; default position is 0% 0%.

Possible Values

  • percent
  • none
  • length
  • top
  • center
  • bottom
  • left
  • right

DOM Syntax

object.style.backgroundPosition = "10 30";

Example -