Transparent settings of the module: filter: alpha (opacity = 80); opacity: 0.8;
PNG transparent settings: Make the PNF-24 mode directly when the image with transparency can be
Problem:
One problem found today when handling the F7Dialog2.0 project, that is, after setting the transparency of a module in IE, if there is a picture with a translucent PNG-24 inserted or set the background in the module, then the translucent rendering will be wrong, the image is ugly.
Cause:
After research and judgment, it is a filter attribute problem. I don't know about the parameters and the rendering mode of the browser. This is a bit deep, I have only used the opacity of alpha for the parameter of IE exclusive filter, and I am not interested in figuring out anything else.
Solution:
Judging from my current knowledge, the two cannot coexist. With the module transparency, do not display a PNG with transparency in it unless you give up IE browser.
So I chose IE6 to use CSS to set the module transparency. other browsers use PNG to set the image transparency.
Example:
Look at the adjusted CSS:
Background-image: url ("../img/yahoo_style_side.png ");
_ Background-image: url ("../img/yahoo_style_side_ie6.png ");
_ Filter: alpha (opacity = 80 );
The first line is to set up a PNG image with a translucent image for IE6's unexpected browser.
The second line sets an independent non-translucent image for IE6.
Row 3 sets the module transparency for IE6
In addition, the transparency set in the PNG-24 image needs to be consistent with the transparency set in IE6 CSS, so that the experience is closer.
Based on the above situation, the following results are achieved: Except for IE6, PNG is not supported, but it supports module transparency. Other browsers support PNG transparency;
Therefore, when there is no gradient shadow in your PNG image, the two will achieve the same effect.
Of course, if your PNG image is not in the translucent module, this will not happen.
Note: IE5 and earlier versions are not considered.