我有一张 svg 地毯需要在地毯上涂抹地毯边缘。
<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg">
<!-- Points -->
<circle cx="50" cy="50" r="20" fill="red"/>
</svg>
把这个圆圈想象成地毯,我想把地毯当作边框。 我们如何动态扩展路径。
你的问题不是很清楚。您的意思是要在圆圈的边缘添加类似边缘的效果吗?
喜欢这个?
<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg">
<!-- Points -->
<circle cx="50" cy="50" r="20" fill="red"
stroke="black" stroke-width="6" stroke-dasharray="1 2"/>
</svg>