The following uses the background black and transparency 0.5 as an example to describe how to make sure that the background is transparent and the text is not transparent, if you are interested, please refer to the following: I hope it will help you.
Taking the background black and transparency 0.5 as an Example
Non ie: Background: rgba (0.5, 0 );
IE: filter: progid: DXImageTransform. Microsoft. gradient (startcolorstr = #7f000000, endcolorstr = #7f000000 );
PS: #7f000000 where 7f is the transparency 0.5 to the hexadecimal value, and 000000 is the black hexadecimal value
For details about Numerical Conversion, refer
Conversion of filter values in rgba and IE
Rgba transparent value iefilter Value
0.1 |
19 |
0.2 |
33 |
0.3 |
4C |
0.4 |
66 |
0.5 |
7f |
0.6 |
99 |
0.7 |
B2 |
0.8 |
C8 |
0.9 |
E5 |
Directly rounded up, without carrying.
Convert Alpha * 255 to hexadecimal notation.
I personally think this writing method is the best, and there is no need to define the background layer separately, the code is simple, I have been using it, compatible with IE6, there is a better solution, you are welcome to leave a message to discuss
The best method for transparent background text is compatible with IE (taking the background black transparency 0.5 as an example)