<feDropShadow>

The <feDropShadow> filter primitive creates a drop shadow of the input image. It is a shorthand filter, and is defined in terms of combinations of other filter primitives.

The result of the <feDropShadow> filter is equivalent to the following:

<feGaussianBlur in="alpha-channel-of-feDropShadow-in"
    stdDeviation="stdDeviation-of-feDropShadow"/>
<feOffset dx="dx-of-feDropShadow" dy="dy-of-feDropShadow"
    result="offsetblur"/>
<feFlood flood-color="flood-color-of-feDropShadow"
    flood-opacity="flood-opacity-of-feDropShadow"/>
<feComposite in2="offsetblur" operator="in"/>
<feMerge>
  <feMergeNode/>
  <feMergeNode in="in-of-feDropShadow"/>
</feMerge>

Usage context

CategoriesFilter primitive element
Permitted contentAny number of the following elements, in any order:
<animate>, <script>, <set>

Attributes

Global attributes

Specific attributes

DOM Interface

This element implements the SVGFEDropShadowElement interface.

Example

SVG

<svg width="200" height="200" xmlns="http://www.w3.org/2000/svg">
  <defs>
    <filter id="shadow">
      <feDropShadow dx="4" dy="8" stdDeviation="4"/>
    </filter>
  </defs>

  <circle cx="50%" cy="50%" r="80"
      style="fill:blue; filter:url(#shadow);"/>
</svg>

Result

Specifications

Specification Status Comment
Filter Effects Module Level 1
The definition of '<feDistantLight>' in that specification.
Working Draft Initial definition

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
Basic supportChrome Full support YesEdge No support NoFirefox Full support YesIE No support NoOpera Full support YesSafari ? WebView Android ? Chrome Android Full support YesEdge Mobile No support NoFirefox Android Full support YesOpera Android Full support YesSafari iOS ? Samsung Internet Android ?
dyChrome Full support YesEdge No support NoFirefox Full support YesIE No support NoOpera Full support YesSafari ? WebView Android ? Chrome Android Full support YesEdge Mobile No support NoFirefox Android Full support YesOpera Android Full support YesSafari iOS ? Samsung Internet Android ?
dxChrome Full support YesEdge No support NoFirefox Full support YesIE No support NoOpera Full support YesSafari ? WebView Android ? Chrome Android Full support YesEdge Mobile No support NoFirefox Android Full support YesOpera Android Full support YesSafari iOS ? Samsung Internet Android ?
inChrome Full support YesEdge No support NoFirefox Full support YesIE No support NoOpera Full support YesSafari ? WebView Android ? Chrome Android Full support YesEdge Mobile No support NoFirefox Android Full support YesOpera Android Full support YesSafari iOS ? Samsung Internet Android ?
stdDeviationChrome Full support YesEdge No support NoFirefox Full support YesIE No support NoOpera Full support YesSafari ? WebView Android ? Chrome Android Full support YesEdge Mobile No support NoFirefox Android Full support YesOpera Android Full support YesSafari iOS ? Samsung Internet Android ?

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown

See also

Document Tags and Contributors

Contributors to this page: fscholz, quitedensepoint, Sebastianz
Last updated by: fscholz,