Importing external SVG (with WebKit)

前端 未结 4 1169
说谎
说谎 2020-12-16 07:16

The following works in Firefox 4, but not Chrome 10:


    
         


        
4条回答
  •  青春惊慌失措
    2020-12-16 07:48

    I do a lot of AJAX requests for SVG markup, where I insert the markup into the DOM. You can't just insert it as a fragment, as far as I know, you have to recursively walk the retrieved XML doc, and create the individual SVG elements.

    So, you might be better off combining the files on the server, before you send them to the browser.

提交回复
热议问题