Background-size is a new property CSS3, but IE8 below is still not supported, you can do this with a filter
Background-size:contain; Shrink the image to fit the dimensions of the element (keeping the pixel's aspect ratio);
Background-size:cover; Expands the image to fill the element (keeping the pixel aspect ratio);
background-size:100px 100px; Adjusts the picture to the specified size;
background-size:50% 100%; Adjusts the picture to a specified size, in percent relative to the size of the containing element.
Browser compatible: IE and roaming does not support;
Firefox Add private properties-moz-background-size support;
Safari and Chrome Add private properties-webkit-background-size support;
Opera does not support the Background-size property, and adding its private properties-o-background-size is not supported.
When IE does not support this property, the filter can be used to achieve such an effect.
Background-image:url (' file:///F:/test/images/flashbg.jpg ');
Background-size:cover;filter:progid:dximagetransform.microsoft.alphaimageloader (src=' file:///F:/test/ Images/flashbg.jpg ',sizingmethod=' scale ');
Background-siza property issues are not supported in the Internet Explorer partial version