There is an Alpha filter in CSS, which can set the transparency of the target element. You can also specify coordinates to achieve transparency across different ranges. The specific syntax is as follows: reference content: {filter: alpha (opacity = opacity, finishopacity = finishopacity, style = style, startx = startx, starty = starty, finishx = finishx, finishy = finishy )}
Specific parameters:
Opacity transparency. The default range is from 0 to 100. They are actually percentages. That is to say, 0 indicates completely transparent, and 100 indicates completely opaque.
Finishopacity is an optional parameter. If you want to set the transparency of the gradient, you can use them to specify the transparency at the end. The range is also 0 to 100.
Style specifies the shape features of the transparent area: 0 represents the unified shape, 1 represents the linear shape, 2 represents the radial shape, 3 represents the rectangle
X coordinate at the beginning of the startx gradient transparency effect.
Y coordinate at the beginning of the starty gradient transparency effect.
The X coordinate at the end of the finishx gradient transparency effect.
The Y coordinate at the end of the finishy gradient transparency effect.
Test: filter: alpha (opacity = 50 );
# Snake {
Backgournd: #666;
Filter: alpha (opacity = 50 );/* Ie */
-Moz-opacity: 0.5;/* Moz, FF */
Opacity: 0.5;/* Css3, ff1.5 */
}
<Div id = "snake"> background transparency </div>
/**************** This example of Baidu is simpler, haha
// Transparent layer
<Div id = "dialogboxbg" style = "position: absolute; top: 0px; left: 0px; width: 100%; Height: 2999px; Z-index: 10001; opacity: 0.4; background-color: # eeeeee; "/>
// The floating layer above the transparent layer, such as the login form.
<Div id = "dialogbox" style = "border: 1px solid #709cd2; Z-index: 10003; position: absolute; width: pixel PX; left: 410.5px; top: 128px; ">
Opacity: 0.4 // This method applies only to FF
Filter: alpha (opacity = 50); // This method is only applicable to IE
Therefore, these two types can be compatible with ipv_^.