Learn Development at Frontend Masters. The background-position property in CSS allows you to move a background image or gradient around within its container. The default values are 0 0. This places your background image at the top-left of the container. Length values are pretty simple: the first value is the horizontal position, second value is the vertical position.
Positioning background from element’s bottom-right corner
Positioning Offset Background Images | CSS-Tricks
The background-position CSS property sets the initial position for each background image. The position is relative to the position layer set by background-origin. It can be defined using one to four values. If two non-keyword values are used, the first value represents the horizontal position and the second represents the vertical position. If only one value is specified, the second value is assumed to be center. If three or four values are used, the length-percentage values are offsets for the preceding keyword value s.
The background-position property sets the starting position of a background image. Tip: By default, a background-image is placed at the top-left corner of an element, and repeated both vertically and horizontally. Get certified by completing a course today!
Join Stack Overflow to learn, share knowledge, and build your career. Find centralized, trusted content and collaborate around the technologies you use most. Connect and share knowledge within a single location that is structured and easy to search. How can I achieve this? The background properties can be combined together, in one background property.