Path: blob/main/files/en-us/web/svg/element/fedropshadow/index.md
6581 views
------{{SVGRef}}
The SVG <feDropShadow> filter primitive creates a drop shadow of the input image. It can only be used inside a {{SVGElement('filter')}} element.
Note: The drop shadow color and opacity can be changed by using the {{SVGAttr('flood-color')}} and {{SVGAttr('flood-opacity')}} presentation attributes.
Example
{{EmbedLiveSample('Example', 150, '100%')}}
Attributes
{{SVGAttr("dx")}}
: This attribute defines the x offset of the drop shadow. Value type: <number>; Default value:
2; Animatable: yes
{{SVGAttr("dy")}}
: This attribute defines the y offset of the drop shadow. Value type: <number>; Default value:
2; Animatable: yes
{{SVGAttr("stdDeviation")}}
: This attribute defines the standard deviation for the blur operation in the drop shadow. Value type: <number>; Default value:
2; Animatable: yes
Global attributes
: Most notably: {{SVGAttr('id')}}
: {{SVGAttr('class')}}, {{SVGAttr('style')}}
: {{SVGAttr('height')}}, {{SVGAttr('in')}}, {{SVGAttr('result')}}, {{SVGAttr('x')}}, {{SVGAttr('y')}}, {{SVGAttr('width')}}
: Most notably: {{SVGAttr('flood-color')}}, {{SVGAttr('flood-opacity')}}
Usage notes
{{svginfo}}
Specifications
{{Specifications}}
Browser compatibility
{{Compat}}