Description »

This property is the shorthand for setting the background of an element.

Browser Compatibility

Possible Values »

  • background: color position size repeat origin clip attachment image;
  • Each sub-value corresponds with the background-property of the same name below. Note that these values can be in a different order, within reason, and that not all values need to be specified.
  • background: none;
  • Eliminates the background entirely.
  • background: inherit;
  • Inherits background values from parent element.

Details »

This single property name combines each of the background properties for convenience:

Note that not all of these sub-properties exist for older versions of browsers, particularly those that do no support CSS3.

In Practice »

Results CSS
Try it! at The CSS Zone Sandbox
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License