Does not work in Explorer 5.0 Windows, Explorer Mac, and iCab.
This page has been translated into Russian.
How to set the opacity of an element.
See also the JavaScript opacity setting test page.
Test paragraph without opacity.
Test paragraph with opacity: 50%.
Style sheet:
.test {
background-color: #6374AB;
width: 100%;
}
.opaque {
opacity: .5;
filter: alpha(opacity=50);
}
These browsers support opacity. It requires a fraction value, percentages are not allowed.
Explorer Windows requires:
filter: alpha(opacity=50);
Note that an element must have layout for a filter to work.
You must specify either a width or a height for any element you want to be opaque,
(except for form fields, because they have a default width set).