top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

What is Opacity in Css?

+1 vote
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%


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 by Drasti Chavda
Contact Us
+91 9880187415
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Karnataka INDIA.