/

HTML / CSS / JavaScript Tutorial

CSS Property: opacity

[this page | pdf | back links]

The CSS (CSS3) opacity property sets the degree of opacity (transparency) of an element. 0 is completely transparent, 1 is completely non-transparent. Note also sets the transparency of all relevant child elements (if you don’t want this to happen then use RGBA colouring).

 

Valid property values (other than inherit and initial) are:

 

Value

Description

number

From 0.0 to 1.0

 

Default Value:

1

JavaScript syntax:

e.g. object.style.opacity="0.6"

Inherited:

No

Animatable:

Yes

 


NAVIGATION LINKS
Contents | Prev | Next | CSS Properties


Desktop view | Switch to Mobile