background-position
The background-position property sets the starting position of a background image.
Formal Syntax
<bg-position>#
JavaScript Access
// Access via element.style
element.style.backgroundPosition = '0% 0%';
Browser Support
| Feature | Chrome | Firefox | Safari | Edge |
|---|---|---|---|---|
| background-position | 1 | 1 | 1 | 12 |
| bottom | 1 | 1 | 1 | 79 |
| center | 1 | 1 | 1 | 79 |
| left | 1 | 1 | 1 | 79 |
| multiple_backgrounds | 1 | 3.6 | 1.3 | 12 |
| right | 1 | 1 | 1 | 79 |
| side-relative_values | 25 | 13 | 7 | 12 |
| top | 1 | 1 | 1 | 79 |
Related Properties
- background
- background-attachment
- background-blend-mode
- background-clip
- background-color
- background-image
- background-origin
- background-position-x
- background-position-y
- background-repeat
- background-size
- background-repeat-x ๐งช
- background-repeat-y ๐งช
- background-position-block ๐ง
- background-position-inline ๐ง
- background-repeat-block ๐ง
- background-repeat-inline ๐ง
- background-tbd ๐ง