📅  最后修改于: 2023-12-03 15:35:11.632000             🧑  作者: Mango
The FE
in FEDropShadow
stands for the "Filter Effects" element in SVG (Scalable Vector Graphics). The stdDeviationX
attribute controls the horizontal blur radius of the shadow created by the FEDropShadow
element.
<feDropShadow stdDeviationX="value" />
value
: A number that specifies the horizontal blur radius of the shadow. The default value is 0
.<svg width="200" height="200">
<rect x="50" y="50" width="100" height="100"
style="filter: url(#drop-shadow);" />
<filter id="drop-shadow">
<feDropShadow stdDeviationX="5" />
</filter>
</svg>
In this example, the feDropShadow
element is used inside a filter
element with an id
of drop-shadow
. The stdDeviationX
attribute is set to 5
. This creates a drop shadow with a horizontal blur radius of 5 pixels for a rect
element with a width of 100 pixels.
stdDeviationX
and stdDeviationY
attributes work together to control the size and position of the shadow.stdDeviationX
value is smaller than the stdDeviationY
value, the shadow will be more vertical.stdDeviationX
value is larger than the stdDeviationY
value, the shadow will be more horizontal.stdDeviationX
or stdDeviationY
attributes is specified, the other value will be set to the same value.The stdDeviationX
attribute of the FEDropShadow
element in SVG controls the horizontal blur radius of the drop shadow created by the element. By setting this attribute, you can customize the size and position of the shadow to suit your needs.