感谢 D3js,我正在将 SVG 元素注入(inject)网页。我很难设置这些元素的样式,因为像
这样的语法path { border: 3px solid green; }
不起作用。
如何使用 CSS 为网页中的 SVG 元素添加边框/轮廓/描边?
最佳答案
在 CSS 中,类似于:
path {
fill: none;
stroke: #646464;
stroke-width: 1px;
stroke-dasharray: 2,2;
stroke-linejoin: round;
}
关于css - 如何在 CSS 中为 SVG 元素添加边框/轮廓/描边?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18330344/