Home > Web Front-end > H5 Tutorial > Detailed explanation of how to deal with IE8 being incompatible with rgba()

Detailed explanation of how to deal with IE8 being incompatible with rgba()

Y2J
Release: 2017-05-20 13:43:21
Original
1835 people have browsed it

The following editor will bring you an article that perfectly solves the problem of incompatibility with rgba() under IE8. The editor thinks it’s pretty good, so I’ll share it with you now and give it as a reference. Let’s follow the editor and take a look.

rgba() is a new attribute of css3, so browsers IE8 and below are not compatible. What should I do? Finally I found the solution.

Solution

Let’s first explain the following rgba

##rgba:

The meaning of rgba, r represents red, g represents green, b represents blue, and a represents transparency.

rgba(0,0,0,.5) This represents black and the transparency is 0.5

To solve the transparency problem under IE8, you can add this sentence:

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

This sentence was originally used for gradient, but there is no gradient effect here, so startColorstr and endColorstr are set to the same color.

Here #7f000000,

#7f represents transparency, 000000 represents color, the following is the corresponding table of transparency:

【Related Recommendations】

1.

Html5 free video tutorial

2.

Detailed explanation of the code for phonegap to complete the contact search function

3.

Detailed explanation of the code for phonegap to complete the cloning and deletion of contact functions

4.

phonegap listens for other events after the deviceready event is triggered

5.

Detailed explanation of an example of page jump and value transfer

The above is the detailed content of Detailed explanation of how to deal with IE8 being incompatible with rgba(). For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template