Background-siza property issues are not supported in the Internet Explorer partial version

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.