Make a picture translucent matte at work found incompatible under IE8
A look again know IE8 does not support RGBA color, and then search compatibility method, did not think so quickly solved.
First talk about the meaning of Rgba:
R represents Red,g on behalf of Green,b on behalf of Blue,a for transparency. Red, green and blue are three primary colors, all of which can be composed of these three colors. For example, Rgba (0,0,0,.5) is a 0.5 transparency black. Modern browsers support Rgba, but in IE8 and other antique-level browsers do not support RGBA, IE8 can only reluctantly support the RGB () function (that is, remove the transparency, can only represent color).
The solutions on the Web are:
Background:rgba (0,0,0,. 5); / * browsers that support RGBA * /
Filter:progid:DXImageTransform.Microsoft.gradient (startcolorstr=#7f000000, endcolorstr= #7f000000);/*IE8 Support */
The second sentence means to execute when the transparency of the previous line does not work. The meaning of this sentence is used to make the gradient, but this place does not need a gradient. So two colors are set to the same color.
Explain the next #7f000000, 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:
The second part is six bits after 19. This is the color value of the six binary. Is the same as the value in the RGB function. For example, RGB (0,0,0) corresponds to #000;
Here, the use of RGBA can be compatible with IE8.
But the practice has found that this method can only be used on the background color, foreground color or other is powerless
Translucent backgrounds compatible with RGBA colors under IE8