The css code is as follows:
.demo{
filter:alpha(opacity=50);
-moz-opacity:0.5;
-khtml-opacity: 0.5;
opacity: 0.5;
}
Note 1: After the transparency is set, the element and its child elements are transparent, and the transparency of the child elements cannot be removed, and must be consistent with the parent element.
Note 2: IE8 and above can be used.