On August 18, Ted Johnson (Microsoft's Program Manager Lead for Web Graphics) announced
on the IE blog that the IE9 browser would support the
CSS3 Color module ,
and in particular, maintain the
opacity property instead of its own
alpha micro-filter. However,
alpha filter support will remain in compatibility modes (Quirks, IE7 and IE8), for which, on the contrary,
opacity is not planned for implementation.
Thus, in order for CSS to work in all versions of Microsoft Explorer, it’s enough to describe transparency with two properties in a row:
. Some Class {
opacity: 0.3;
filter: alpha (opacity = 30);
}
If you specify transparency not using CSS, but using javascript, then be careful that the script does not assume
that all versions of IE understand
filter and do not understand
opacity : this assumption will be wrong with respect to IE9. Instead, Ted Johnson
recommended using the
opacity property in scripts, depending on the value of some (pre-computed) variable, which determines whether the browser supports this property:
var useOpacity = (typeof document.createElement ("div"). style.opacity! = 'undefined');
For more detailed examples you can refer to his blog.