background-position
时间: 2023-10-16 07:11:32 浏览: 30
The CSS property `background-position` is used to set the position of the background image within its container element. It takes two values: the first value represents the horizontal position and the second value represents the vertical position.
The values can be specified in different units such as pixels, percentages, or keywords (e.g. top, bottom, left, right, center). When only one value is specified, the other value is assumed to be center.
For example, `background-position: center top;` will center the background image horizontally and place it at the top of its container element.
This property is commonly used to create visually appealing designs by positioning background images in specific locations on a webpage.