docs.rodeo

MDN Web Docs mirror

{{SVGRef}} 

The <filter> SVG element defines a custom filter effect by grouping atomic filter primitives. It is never rendered itself, but must be used by the {{SVGAttr("filter")}}  attribute on SVG elements, or the {{cssxref("filter")}}  {{Glossary("CSS")}}  property for SVG/HTML elements.

Usage context

{{svginfo}} 

Attributes

DOM Interface

This element implements the {{domxref("SVGFilterElement")}}  interface.

Example

SVG

<svg width="230" height="120" xmlns="http://www.w3.org/2000/svg">
  <filter id="blurMe">
    <feGaussianBlur stdDeviation="5" />
  </filter>

  <circle cx="60" cy="60" r="50" fill="green" />

  <circle cx="170" cy="60" r="50" fill="green" filter="url(#blurMe)" />
</svg>

Result

{{EmbedLiveSample("Example",235,150)}} 

Specifications

{{Specifications}} 

Browser compatibility

{{Compat}} 

See also

In this article

View on MDN