A friend who uses CSS Filters may encounter the following problem: Set the divFilter: alpha (opacity = 50 );The text in the filter is translucent. What should we do in this case?
After reading a large amount of materials, I finally found a method compatible with the css transparent filters of ie6, ie7, ie8, and firefox N times. Let me give an example.
Html code:
<Div id = "body">
<Span> <longge blog> solves the problem of CSS Filter filtering text at the same time </span>
</Div>
Css code:
<Style type = "text/css">
# Body {border: 1px solid # c00; background-color: rgba (0.5, 0,); background: # f00 \ 9; filter: alpha (opacity = 10 ); width: 500px; margin: 40px auto; line-height: 200%; font-size: 14px; padding: 14px ;}
</Style>
Such code does not solve the problem of text filtering. to filter text, you must add this line of code to the CSS code:
# Body * {position: relative ;}
The asterisk is used to allow IE6 and IE7 to be executed. Firefox and IE8 will not be executed. Firefox itself does not support the filter function unique to IE, so there is no need to add an asterisk here. How can this problem be solved? Easy ~
Address: http://www.52blogger.com/archives/532