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.