<feBlend>
<feColorMatrix>
<feComponentTransfer>
<feComposite>
<feConvolveMatrix>
<feDiffuseLighting>
<feDisplacementMap>
<feDistantLight>
<feFlood>
<feFuncA>
<feFuncB>
<feFuncG>
<feFuncR>
<feGaussianBlur>
<feImage>
<feMerge>
<feMergeNode>
<feMorphology>
<feOffset>
<fePointLight>
<feSpecularLighting>
<feSpotLight>
<feTile>
<feTurbulence>
<filter>
<font>
<font-face>
<font-face-format>
<font-face-name>
<font-face-src>
<font-face-uri>
<foreignObject>
The SVG
<feDropShadow>
filter primitive creates a drop shadow of the input image. It can only be used inside a
<filter>
元素。
注意:
The drop shadow color and opacity can be changed by using the
flood-color
and
flood-opacity
presentation attributes.
<svg viewBox="0 0 30 10" xmlns="http://www.w3.org/2000/svg">
<defs>
<filter id="shadow">
<feDropShadow dx="0.2" dy="0.4" stdDeviation="0.2"/>
</filter>
<filter id="shadow2">
<feDropShadow dx="0" dy="0" stdDeviation="0.5"
flood-color="cyan"/>
</filter>
<filter id="shadow3">
<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"
style="fill:pink; filter:url(#shadow);"/>
<circle cx="15" cy="50%" r="4"
style="fill:pink; filter:url(#shadow2);"/>
<circle cx="25" cy="50%" r="4"
style="fill:pink; filter:url(#shadow3);"/>
</svg>
dx
This attribute defines the x offset of the drop shadow.
Value type
:
<number>
;
默认值
:
2
;
Animatable
:
yes
dy
This attribute defines the y offset of the drop shadow.
Value type
:
<number>
;
默认值
:
2
;
Animatable
:
yes
stdDeviation
This attribute defines the standard deviation for the blur operation in the drop shadow.
Value type
:
<number>
;
默认值
:
2
;
Animatable
:
yes
Most notably:
id
class
,
style
height
,
in
,
result
,
x
,
y
,
width
Most notably:
flood-color
,
flood-opacity
| 类别 | Filter primitive element |
|---|---|
| 准许内容 |
Any number of the following elements, in any order:
<animate>
,
<script>
,
<set>
|
| 规范 |
|---|
|
Filter Effects Module Level 2
(Filter Effects 2)
# feDropShadowElement |
BCD tables only load in the browser
最后修改: , 由 MDN 贡献者