You can use the opacity attribute to set the background translucency effect in css. This attribute is used to set the opacity level of the element, such as [opacity:0.5], which means setting the element to a semi-transparent state.
The operating environment of this article: windows10 system, css 3, thinkpad t480 computer.
If you want to set the translucency effect of an element in CSS, you can use the opacity attribute. The opacity attribute is used to set the opacity level of the element, such as [opacity:0.5].
Syntax:
opacity: value|inherit;
Attribute value:
value Specifies opacity. From 0.0 (fully transparent) to 1.0 (fully opaque). Test
inherit The value of the opacity attribute should be inherited from the parent element.
Specific example code:
(Free video tutorial:css video tutorial)
The running result is as follows:
Related recommendations:CSS tutorial
The above is the detailed content of How to set background translucency in css. For more information, please follow other related articles on the PHP Chinese website!