background-color
The background-color property sets the background color of an element.
Formal Syntax
<color>
JavaScript Access
// Access via element.style
element.style.backgroundColor = 'transparent';
Browser Support
| Feature | Chrome | Firefox | Safari | Edge |
|---|---|---|---|---|
| background-color | 1 | 1 | 1 | 12 |
| currentColor | ≤31 | ≤50 | ≤9.1 | ≤15 |
| transparent | 1 | 1 | 1 | 12 |
Related Properties
- background
- background-attachment
- background-blend-mode
- background-clip
- background-image
- 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 🚧