【发布时间】:2019-11-02 01:26:25
【问题描述】:
我有这个问题,我需要在一个圆圈中添加 box-shadow,但似乎不可能。
为什么它不起作用,或者我如何向 SVG 路径中的 </circle> 元素添加圆形阴影以具有当前规格的发光效果?
/*
circle {
fill: red; <-- works
box-shadow: 0 0 50px red; <-- does not work
}
*/
<svg width="450" height="450">
<path id="motionPath"
d="M 50 200 L 400 200 "
stroke="black" fill="transparent" />
<circle class="circle" r=5 fill=#45b6fe z-index=55>
<animateMotion dur="8s" repeatCount="indefinite" rotate="auto">
<mpath href="#motionPath" />
</animateMotion>
</circle>
</svg>
【问题讨论】: