Loading a SVG file with svg.js

前端 未结 3 1139
青春惊慌失措
青春惊慌失措 2020-12-14 12:36

I have a HTML5 page with a SVG element in it. I would like to load a SVG file, extract some elements from it and dispose them one by one with a script.

I used jQuery

3条回答
  •  臣服心动
    2020-12-14 13:01

    You should take a look at the svg.import.js plugin

    The documentation says...

    All imported elements with an id will be stored. The object with all stored elements is returned by the import method:

    var rawSvg = '

提交回复
热议问题