Web4College

CSS opacity property

src

Description

CSS opacity property determines the transparency of an element. The value of opacity varies from 0 to 1 i.e. [0-1]

Syntax

opacity : value between 0 and 1

Property values

fully opaqueDefault

The object (element) is fully opaque.

opacity: 1;
Try it

fully transparent

The object (element) is fully transparent.

opacity: 0;
Try it

partially transparency

It represents 50% transparency of the object (element).

opacity: 0.5;
Try it

Applicable to

It applies to all elements