B.71. -moz-opacity

Mozilla-based browsers (including Netscape 6 or later) support a number of nonstandard CSS properties that were implemented for the skinning engines of those browsers. These properties all begin with the prefix -moz- to indicate their nonstandard nature. Several of these properties are useful for general Web site design as well, and have equivalents in current drafts of future CSS standards.

The -moz-opacity property lets you create translucent elements that allow elements behind them partially to show through.

Inherited: No

See also: Section B.35filter

B.71.1. Value

You can set the opacity as a decimal number between 0.0 (totally transparent) and 1.0 (totally opaque), or as a percentage between 0% (transparent) and 100% (opaque). You should generally use decimal numbers, as the draft CSS3 standard does not currently allow for percentages.

Initial value: 1.0

B.71.2. Compatibility

CSS Version: n/a

This property works in Mozilla-based browsers, including Netscape 6 or later, only.

Equivalent functionality is planned for inclusion in CSS3, but final property names and values are likely to differ. To follow the work on this front, see the CSS Working Group Web site.

B.71.3. Example

This style rule makes the element with ID sidebar 50% transparent:

#sidebar {
  -moz-opacity: 0.5;
}

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset