Partager via


opacity property

Gets or sets a value that specifies object or group opacity in Cascading Style Sheets (CSS) or Scalable Vector Graphics (SVG).

 

Syntax

Integer value = object.put_opacity(Floating-point v);Integer value = object.get_opacity(Floating-point* fOpacity);

Property values

Type: float

inherit (inherit)

Indicates that the property takes the same computed value as the property for the element's parent.

String format

<alphavalue> | inherit

CSS information

Applies To All elements
Media visual
Inherited no
Initial Value 1

Standards information

Remarks

The opacity setting is applied uniformly across the entire object. Any values outside the range 0.0 to 1.0 will be clamped to this range.

Object or group opacity can be thought of conceptually as a postprocessing operation. Conceptually, after the object or group is rendered into an RGBA offscreen image, the object or group opacity setting specifies how to blend the offscreen image into the current background.

Requirements

Minimum supported client

Windows Vista with SP1, Windows 7

Minimum supported server

Windows Server 2008 R2

Header

Mshtml.h

IDL

Mshtml.idl

DLL

Mshtml.dll