Style opacity Property
Style opacity Property
The opacity property is used to either set or return the opacity level of an element. In this, 0 is transparent while 0.5 is semi-transparent and 1 is opaque.
Syntax:-
Its syntax is:- object.style.opacity OR object.style.opacity = number | initial | inherit
Return:-
Its return is:- string having opacity-level of an element
Further Explanation:-
Value | Description |
---|---|
number | Specifies opacity from 0 to 1. |
initial | Sets property to its default value. |
inherit | Inherits property from its parent element. |