我想在d3行添加stroke
和fill
。添加描边并填写d3行
但是如果我添加fill
到path
我得到。
我能解决我的代码重复的问题。我认为有一个更好的解决方案。例如
简单的svg。
<svg height="150" width="200" fill="red" stroke="blue" stroke-width="4">
<path d="M80,50L110,80L140,90L170,70L20080L320,70"></path>
</svg>
<svg height="150" width="200" fill="none">
<path d="M80,50L110,80L140,90L170,70L20080L320,70" stroke="red" stroke-width="8"></path>
<path d="M80,50L110,80L140,90L170,70L20080L320,70" stroke="blue" stroke-width="4"></path>
</svg>