我想在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>