Specifies where the background image is attached in the box.
- content-box is the area inside any padding or border.
- padding-box is from the outside edge of the padding.
- border-box is from the outside edge of the border and will sit on top of and cover the background.
When background-attachment is set to fixed this property has no effect.
- Live Example
- Play with the code in the textarea below.
- padding-box, border-box, content-box
- Default value
- Introduced in CSS version
- Applies to elements
- Browser Support
Browsers IE Firefox Safari Opera Chrome Versions 9 8 5 11.6 17
See the full list CSS properties and browser support: CSS Properties