Home  >  Article  >  Web Front-end  >  What is the property to change transparency in css

What is the property to change transparency in css

王林
王林Original
2020-11-11 17:22:349299browse

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;

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;
}

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!

Statement:
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