Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. SVG
  3. Reference
  4. Elements
  5. <feDropShadow>

<feDropShadow>

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.

The<feDropShadow>SVG filter primitive creates a drop shadow of the input image. It can only be used inside a<filter> element.

Note:The drop shadow color and opacity can be changed by using theflood-color andflood-opacity presentation attributes.

Like other filter primitives, it handles color components in thelinearRGBcolor space by default. You can usecolor-interpolation-filters to usesRGB instead.

Usage context

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

Attributes

DOM Interface

This element implements theSVGFEDropShadowElement interface.

Example

html,body,svg {  height: 100%;}
html
<svg viewBox="0 0 30 10" xmlns="http://www.w3.org/2000/svg">  <defs>    <filter>      <feDropShadow dx="0.2" dy="0.4" stdDeviation="0.2" />    </filter>    <filter>      <feDropShadow dx="0" dy="0" stdDeviation="0.5" flood-color="cyan" />    </filter>    <filter>      <feDropShadow        dx="-0.8"        dy="-0.8"        stdDeviation="0"        flood-color="pink"        flood-opacity="0.5" />    </filter>  </defs>  <circle cx="5" cy="50%" r="4" fill="pink" filter="url(#shadow)" />  <circle cx="15" cy="50%" r="4" fill="pink" filter="url(#shadow2)" />  <circle cx="25" cy="50%" r="4" fill="pink" filter="url(#shadow3)" /></svg>

Specifications

Specification
Filter Effects Module Level 1
# feDropShadowElement

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2026 Movatter.jp