The ie8rgba color is semi-transparent, and the ie8rgba color is semi-transparent.

Source: Internet
Author: User

The ie8rgba color is semi-transparent, and the ie8rgba color is semi-transparent.

When an image translucent mask is made at work, it is not compatible with IE8.

Check again to know IE8 does not support rgba color, then search compatibility method, did not expect so quickly solved.

Let's talk about the meaning of rgba:

R represents red, g Represents green, B Represents blue, and a represents transparency. Red, green, and blue are three primary colors. All colors can be combined by these three colors. For example, rgba (0.5, 0,. 5) is black with a transparency. Modern browsers support rgba, but they do not support rgba in IE8 and other antique browsers. IE8 can barely support the rgb () function (that is, the transparency is removed and only the color is displayed ).

The solution on the internet is:

Background: rgba (, 0,. 5);/* supports rgba browsers */

Filter: progid: DXImageTransform. Microsoft. gradient (startColorstr = #7f000000, endColorstr = #7f000000);/* IE8 support */

The second sentence means that the statement is executed when the transparency of a row does not work. The meaning of this sentence is originally used for gradient, but there is no need for gradient in this place. So both colors are set to the same color.

To explain #7f000000, the first part is 7f after. Is the IEfilter value of rgba transparency 0.5. Each number from 0.1 to 0.9 corresponds to an IEfilter value. The relationship is as follows:

The second part is the six digits after the 19th digit. This is a hexadecimal color value. The value must be the same as that in the rgb function. For example, rgb (, 0,) corresponds to #000; are black.

By now, rgba is compatible with IE8.

However, after practice, we found that this method can only be used on the background color, and the foreground color or others are powerless.

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.