Those stroke attributes are what's causing it. I cannot immediately tell what's causing it, but it seems to be a class added by the react-d3-tree library.
I added the following to your styles.css, which fixed it.
svg .rd3t-node {
stroke-width: 0px;
}
Note that if you add anything that has a stroke to your svg, this might also mess with the stroke. It would be better to check the react d3 tree documentation to see if you can override it in a better way.
发布评论
评论(1)
在检查器中查看代码时,您可以看到以下类添加到元素中:
这些中风属性是导致它的原因。我无法立即分辨出是什么原因引起的,但是它似乎是React-D3-Tree库添加的类。
我将以下内容添加到您的styles.css,以修复它。
请注意,如果您在SVG中添加任何中风的东西,这也可能会弄乱中风。最好检查
react d3树
文档,以查看是否可以更好地覆盖它。When viewing your code in the inspector, you can see the following class is added to your elements:
Those stroke attributes are what's causing it. I cannot immediately tell what's causing it, but it seems to be a class added by the react-d3-tree library.
I added the following to your styles.css, which fixed it.
Note that if you add anything that has a stroke to your svg, this might also mess with the stroke. It would be better to check the
react d3 tree
documentation to see if you can override it in a better way.