Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

filter attribute | filter property

The filter property is generally used to apply a previously define filter to an applicable element.

This property is read/write.

Syntax

HTML
<element filter="ptr" ... >
JavaScript
object.filter = ptr
ptr = object.filter

Property values

Type: DOMString

Generally used to apply a previously defined filter to an element invoking the filter property.

ValueCondition
<funciri>

A functional IRI reference, such as filter:url(#Gaussian_Blur)", to a filter element which defines the filter effects to be applied to the applicable element.

none

Do not apply any filter effects to this element (default value).

inherit

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

 

Remarks

Filter elements are never rendered directly; their only usage is as something that can be referenced using the filter property. Be aware that filter elements are available for referencing even when the display property on the filter element or any of its ancestors is set to none.

In the following example, a previously defined Gaussian_Blur filter (that is, filter:url(#Gaussian_Blur)"/>) is being applied to an SVG ellipse:


<ellipse cx="200" cy="150" rx="70" ry="40"
         style="fill:#ff0000; stroke:#000000;
         stroke-width:2; filter:url(#Gaussian_Blur)"/>

See also

CSSStyleDeclaration
Filter

 

 

Show:
© 2014 Microsoft