Home > Article > Web Front-end > Where is the transparency attribute in css
The transparency property in CSS is used to control the transparency of an element, that is, the extent to which the element allows light to pass through. The syntax is: opacity: <value>, which can be a floating point number between 0 (fully transparent) and 1 (fully opaque), or 0.0 or 1.0. This attribute is widely supported by all major browsers.
Transparency attribute in CSS
In CSS, the transparency attribute is used to control the transparency of an element, that is, the element The extent to which light is allowed to pass through. The syntax is:
<code class="css">opacity: <value>;</code>
Where, <value>
can be the following values:
Example of transparency value:
opacity : 0.5;
Set the element to 50% transparencyopacity: 0.25;
Set the element to 25% transparencyopacity: 1;
Set an element to be fully opaque Browser support:
The transparency property is widely supported by all major browsers, including Chrome, Firefox, Safari and Edge.
Usage Notes:
The above is the detailed content of Where is the transparency attribute in css. For more information, please follow other related articles on the PHP Chinese website!