What do we mean by Opacity in CSS3?

 Posted by Vishalneeraj-24503 on 4/25/2015 | Category: CSS 3 Interview questions | Views: 1206 | Points: 40

Opacity is used to show or hide the html element.
For Example 0 for hide and 1 for show.
<p style="opacity: 0">Show Me</p> //will not show on the page
<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.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response