top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is Opacity in Css?

+1 vote
575 views
What is Opacity in Css?
posted May 30, 2018 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

2 Answers

0 votes

The opacity property in CSS specifies how transparent an element is. Opacity has a default initial value of 1 (100% opaque) and Opacity is not inherited.
Values are a number from 0 to 1 representing the opacity of the channel on the scale of 0 to 100%

Example:

img {
    opacity: 0.5;
    filter: alpha(opacity=50); /* For IE8 and earlier */
}

img:hover {
    opacity: 1.0;
    filter: alpha(opacity=100); /* For IE8 and earlier */
}

in the above example image has the opacity as 50% and whenever we hover it becomes 100% opaque.

answer May 31, 2018 by Salil Agrawal
0 votes

Opacity determines the Transparency of an element in CSS. The value of opacity lies between 0.0 to 1. The less the value, the more Transparent it would be.The default value of opacity is 1.

answer Mar 26, 2019 by Drasti Chavda
...