Home > Article > Web Front-end > How to set transparency in css background
How to set transparency in css background: 1. Use [rgba()] to set the color and transparency of page elements; 2. The opacity attribute is inheritable and will make all elements in the container transparent.
The operating environment of this tutorial: windows7 system, css3 version, DELL G3 computer.
How to set transparency in css background:
rgba() in css can be used to set the color and transparency of page elements. The rgba() color value is an RGB color value. extension with an alpha channel through which you can set the opacity of an element.
In CSS3, an opacity attribute was added, using this attribute to set the transparency of the element. The opacity attribute is inheritable and will make all elements in the container transparent;
Recommended related tutorials: CSS video tutorial
The above is the detailed content of How to set transparency in css background. For more information, please follow other related articles on the PHP Chinese website!