According to Canius (http://caniuse.com/#search =background-size), background-size compatibility is IE9 and the above browsers, as shown in.
Instance code:
<!doctype html>
Effect:
(1) Chrome browser:
(2) IE8 Browser:
Compatibility scenarios:
Use the Filter property:
. parent { width:400px; height:400px; margin:100px; border:1px solid red; Background:url (img/aaa.jpg) no-repeat Center Center; background-size:100% 100%; /* Next behavior key setting * /Filter:progid:DXImageTransform.Microsoft.AlphaImageLoader (src= ' img/aaa.jpg ', Sizingmethod = ' scale '); }
IE8 Browser Effect:
Principle:
Filter:progid:DXImageTransform.Microsoft.AlphaImageLoader (enabled=benabled, Sizingmethod=ssize, Src=surl)
enabled: options available. A Boolean value (Boolean). Sets or retrieves whether the filter is active. True: the default value. Filter activated. False: The filter is forbidden.
Sizingmethod: options available. String. Sets or retrieves how the picture of the object that the filter acts on is displayed within the bounds of the object container. Crop: Cuts the picture to fit the object's size. Image: Default value. Increase or decrease the size boundaries of an object to fit the dimensions of the picture. scale: Scales the picture to fit the object's dimension boundaries .
src: required option. String. Specifies the background image using an absolute or relative URL address. If this parameter is omitted, the filter will not function.