Google News
logo
CSS3 - Interview Questions
What do we mean by Opacity in CSS3 ?
Opacity is a style property used to show or hide the html element.
For example 0 for hide and 1 for show.

<p style="opacity: 0">Show Me</p>
<p style="opacity: 0.5">Show Me</p>
<p style="opacity: 1">Show Me</p>

The Opacity declaration sets how opaque an element is.An opacity value of 1 means the element is fully opaque. An opacity value of 0 means an element is not at all opaque, i.e. fully transparent.This elements opacity is 0.5 .
Note : That both the text and the background-color are affected by the opacity level.
Advertisement