Sets the transparency level of an element. For Internet Explorer, use filter with 'Alpha(opacity=percent)'.
Note: Internet Explorer supports the opacity property from version 9.In older Internet Explorer versions, use the filter.alpha property.
The opacity property works for all elements, as opposed to Internet Explorer's filter.alpha property that only works for absolute positioned elements.
The example below shows a cross-browser solution for creating the opacity effect from CSS.
One of the following values:
|Takes the value of this property from the computed style of the parent element.|
|Floating-point number [0-1] .|
Example HTML code 1:
This example illustrates the use of the opacity property:
Did you find this example helpful?
Supported by tags:
User Contributed Comments