What is the property to change transparency in css

王林
Release: 2020-11-30 14:40:04
Original
9458 people have browsed it

The property that changes transparency in css is Opacity. The Opacity attribute sets the transparency level of an element. The syntax is [opacity: value|inherit;], value specifies the opacity, and inherit indicates that the attribute value should be inherited from the parent element.

What is the property to change transparency in css

The operating environment of this tutorial: Windows 10 system, CSS3, this article is applicable to all brands of computers.

The Opacity property sets the transparency level of an element.

(Learning video recommendation: css video tutorial)

What is the property to change transparency in css

## Syntax:

opacity: value|inherit;
Copy after login

Attribute value:


value Specifies opacity. From 0.0 (fully transparent) to 1.0 (fully opaque)

inherit The value of the Opacity attribute should be inherited from the parent element

Example:


div
{
    opacity:0.5;
}
Copy after login

Related recommendations:

CSSTutorial

The above is the detailed content of What is the property to change transparency in css. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template