background-image
The background-image property sets a background image for an element.
Formal Syntax
<bg-image>#
JavaScript Access
// Access via element.style
element.style.backgroundImage = 'none';
Browser Support
| Feature | Chrome | Firefox | Safari | Edge |
|---|---|---|---|---|
| background-image | 1 | 1 | 1 | 12 |
| element | — | 4 | — | — |
| gradients | 1 | 3.6 | 4 | 12 |
| image-rect | — | 4 | — | — |
| image-set | 113 | 89 | 17 | 113 |
| multiple_backgrounds | 1 | 3.6 | 1.3 | 12 |
| none | 1 | 1 | 1 | 12 |
| svg_images | 8 | 4 | 5 | 12 |
Related Properties
- background
- background-attachment
- background-blend-mode
- background-clip
- background-color
- background-origin
- background-position
- 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 🚧