CSS Background Opacity Not Working in IE 8
This CSS for background opacity of a
background: rgba(255, 255, 255, 0.3);
It works fine in Firefox but not in IE 8. How can we make it work?
Solution
To simulate RGBA and HSLA background in IE, we can use a gradient filter with the same start and end color (the alpha channel is the first pair in the value of HEX):
background: rgba(255, 255, 255, 0.3); /* browsers */ filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#4cffffff', endColorstr='#4cffffff'); /* IE */
The above is the detailed content of Why Isn\'t My CSS Background Opacity Working in IE8?. For more information, please follow other related articles on the PHP Chinese website!