What is the background-position property in CSS?

The background-position property in CSSCascade Style Sheets is used to set the position of a background image.

The default position of a background image is at the top left corner.

Syntax

background-position: value;

Property value

Here, we can write the value at which we want to place our border-image, like top left, bottom right, center, etc.

Code

Below is the basic HTMLHyperText Markup Language and CSS code to demonstrate the use of the background-position property.

Free Resources