Opacity in CSS
Opacity
CSS opacity property provides an excellent means of adding opacity to any element. The opacity property value ranges from 0.0 (fully transparent) to 1.0 (fully opaque). If you want to have the opacity property work in all versions of IE, use the filter:alpha(opacity=x). x can take a value from 0 to 100. The value 0 results in a completely transparent element, whereas the value 100 makes the element completely opaque.
Syntax:-
Its syntax is:-
< style >
element{
opacity: number| initial| inherit;
}
< /style >
Further Explanation:-
Value | Description |
---|---|
number | Specifies the opacity from 0.0 to 1.0. |
initial | Sets this property to its default value. |
inherit | Inherits this property from its parent element. |