background-attachment
The background-attachment property specifies whether a background image scrolls with the element.
Formal Syntax
<attachment>#
JavaScript Access
// Access via element.style
element.style.backgroundAttachment = 'scroll';
Browser Support
| Feature | Chrome | Firefox | Safari | Edge |
|---|---|---|---|---|
| background-attachment | 1 | 1 | 1 | 12 |
| fixed | 1 | 2 | 15.4 | 12 |
| local | 1 | 25 | 15.4 | 12 |
| multiple_backgrounds | 1 | 3.6 | 1.3 | 12 |
| scroll | 1 | 1 | 1 | 12 |
Related Properties
- background
- background-blend-mode
- background-clip
- background-color
- 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 ๐ง