Add SVG element to existing SVG using DOM

后端 未结 2 846
温柔的废话
温柔的废话 2020-11-27 15:13

I have a HTML construction that resembles the following code:

//draw some svg elements
<
2条回答
  •  时光说笑
    2020-11-27 15:37

    If you're dealing with svg's a lot using JS, I recommend using d3.js. Include it on your page, and do something like this:

    d3.select("#svg1").append("circle");
    

提交回复
热议问题