Description

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.

See also:

Live Example
Play with the code in the textarea below.

Values
padding-box, border-box, content-box
Default value
padding-box
Introduced in CSS version
3
Applies to elements
All
Inherited
No
Browser Support
BrowsersIEFirefoxSafariOperaChrome
Versions98511.617

See the full list CSS properties and browser support: CSS Properties