How do I set transparency? Defines the Opacity property, which enables any element to render a translucent effect, and the basic syntax for the Opacity property is as follows:
<alphavalue>|inherit
Value Description:
1. <alphavalue>| is a length value consisting of a floating-point number and a unit identifier. cannot be negative, the default value is 1.opacity with a value of 1 o'clock, the element is completely opaque, and conversely, the value is 0 o'clock, the element is completely transparent, not visible.
2, inherit represents inheritance, that is, inherit the opacity of the parent element.
3, for IE browser, you can use its Private property filter to be compatible with: Filter:alpha (Alpha=value);.
Example: Design lightbox advertising background cloth
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
Demonstrate:
Related articles:
CSS set an element translucent
CSS3 Tutorial (8): CSS3 Transparency Guide
Example description of using RGBA to adjust transparency in CSS3