Depending on the Caniuse (http://caniuse.com/#search =rgba), RGBA compatibility is IE9 and above browsers.
Instance code:
<!doctype html>
Chrome browser Effects:
IE8 Browser effect (no background):
RGBA Compatibility Processing:
. parent { width:400px; height:400px; margin:100px; font-size:20px; Color: #FF0000; border:1px solid red; Background:rgba (0, 0, 0, 0.5); /* Next Key setting * /Filter:progid:DXImageTransform.Microsoft.gradient (startcolorstr= #7f000000, endcolorstr=# 7f000000); }
Setting the Filter property to be performed when the transparency of the previous line does not work, Filter:progid:DXImageTransform.Microsoft.gradient is used for gradients, but this place does not require gradients, So two colors are set to the same color.
This color "#7f000000" is made up of two parts.
The first part is the 7f behind the # number . is the Iefilter value of the RGBA transparency 0.5. From 0.1 to 0.9 each number corresponds to a iefilter value. The corresponding relationship is as follows:
That is: The value obtained by the alpha*255 is converted to 16 binary.
The second part is the six-bit color value after 7f , which is the same as the value in the RGB function, such as RGB (255,255,255) corresponds to #ffffff.
Summary: This completes IE8 and the following IE browser RGBA compatibility processing.