Get the App
SLTechnology News&Howtos  ›  Development  › 

Is rgba compatible with ie8 in css3?

Shulou Source: shulou.com Published: 2022-05-31 20:35:53 09月21日 Update

In this article, the editor introduces in detail "rgba compatible with ie8 in css3" with detailed content, clear steps and proper handling of details. I hope that this article "rgba compatible with ie8 in css3" can help you solve your doubts.

Rgba in css3 is not compatible with ie8. Filter can be used for compatibility, and the syntax is "filter:progid:DXImageTransform.Microsoft.gradient (startColorstr= color value, endColorstr= color value)".

The operating environment of this tutorial: windows10 system, CSS3&&HTML5 version, Dell G3 computer.

Whether rgba in css3 is compatible with ie8

Incompatible.

Css3 rgba adds an alpha (transparency) channel based on the original 3 primary colors. The compatibility of this attribute is as follows:

Only versions after 9 of the IE family support this attribute.

Rgba:

The meaning of rgba, r stands for red,g, for green,b, for blue,a, for transparency.

Rgba (0re0re0.5) this represents black, with a transparency of 0.5.

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

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

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

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

Examples are as follows:

Background: rgba (0re0j0j0pl .6); filter:progid:DXImageTransform.Microsoft.gradient (startColorstr=#99000000,endColorstr=#19000000)

The eight digits after the startColorstr=#99000000:# are split into two parts, 99000000, which correspond to AA (IEfilter) GGBBAA (GBA).

The first one is 99 after #. Is the IEfilter value of rgba transparency 0.6. Each number from 0.1 to 0.9 corresponds to an IEfilter value.

The second part is the six digits after 99, which is the hexadecimal color value, for example, rgb (255255255) corresponds to # ffffff; is white.

After reading this, the article "is rgba compatible with ie8 in css3" has been introduced. If you want to master the knowledge points of this article, you still need to practice and use it yourself to understand it. If you want to know more about related articles, welcome to follow the industry information channel.

Tags: Representation transparency color article content attributes numbers version support proper one sentence two digits compatibility original primary color only meaning foundation family Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Docker vpn MySQL Xiaomi