Description

Sets the size of background images. First value sets the width, second height. Negative values are not allowed.
Value of contain, scales the image preserving the aspect ratio, to the largest size that will fit within both width and height of the box.
Cover scales the image preserving the aspect ratio, to the smallest size that both width and height will cover the background area.

Live Example
Play with the code in the textarea below.

Values
[ <length> | <percentage> | auto ]{1,2} | cover | contain
Default value
auto
Introduced in CSS version
3
Applies to elements
All
Inherited
Yes
Browser Support
BrowsersIEFirefoxSafariOperaChrome
Versions9-moz--webkit-o--webkit-

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