style.filter (Property)

Defines the visual, reveal or blend filter for the object.

Availability:

CSS level - Proposed
JScript - 3.0
Internet Explorer - 4.0
Property/method value type:String primitive
JavaScript syntax:IEmyStyle.filter
CSS syntax:filter: aFilter(aParam=aValue, ...) ...
Argument list:aFilterA filter name
aParamA filter parameter name
aValueA filter parameter value

This property defines a visual effect that is used when the display is updated as the result of a change to the content of an element.

There are three kinds of filters that can be applied to an object.

A visual filter is used to enhance the visual appearance of objects. For example, to flip them over, add a glow effect or a drop shadow.

A reveal filter is used to apply a transition effect as the appearance changes.

A blend filter controls the speed at which a reveal filter is applied.

You can define more than one filter, they just need to be space separated from one another.

Here is a list of the procedural filter function names:

Here is a list of the static filters supported at version 5.5 of the MSIE browser:

The old blendTrans() and revealTrans() filters are now replaced by these transition filters:

Filters are defined as if they were a sequence of space delimited function calls. They aren't really functions because their argument passing mechanism is not truly JavaScript based. Arguments to each filter function are defined as name=value pairs. These correspond to the properties and method invocations of the underlying filter object.

Refer to the specific topics on each filter function for details of what it does and how you can control it.

When using the filters in the context of the Style object, the function name for each filter must be preceded by this string:

"progid:DXImageTransform.Microsoft."

You can apply the filters directly as properties of the filter object that belongs to HTML element objects themselves.

Visual filters require that the target objects have enough layout information to enable the filter to work. This means they require height and width to be defined using absolute positioning or setting the contentEditable property flag to true.

Warnings:

FlipH()

FlipV()

Grayscale()

Invert()

Mask()

XRay()

BlendTrans()

RevealTrans()

See also:Element.filters[], onFilterChange, Procedural surfaces, Static filters, style.textShadow, Transition, Visual filters