CSS background-position is a property used to control the positioning of a background image within the background area of an HTML element.
It allows you to specify the horizontal and vertical placement of the image.
background-position: horizontal vertical;You can specify the positioning using keywords (left, right, top, bottom) or specific coordinates (%) . Here are some common values:
body {
background-image: url('/images/common/background.jpeg');
background-position: right bottom;
background-repeat: no-repeat;
}
body {
background-image: url('/images/common/background.jpeg');
background-position: right bottom;
background-repeat: no-repeat;
}
body {
background-image: url('/images/common/background.jpeg');
background-position: 50% 25%;
background-repeat: no-repeat;
}
This example positions the background image at 50% from the left and 25% from the top of the background area.