简体   繁体   中英

Export SVG tag as image from HTML webpage

I am trying to export an image from an <svg> tag in an html page.

I have copied the whole svg tag and pasted in notepad saved in.svg extension.

But I get this error: This XML file does not appear to have any style information associated with it. The document tree is shown below.

I have tried to use svg crowbar 2 in Chrome but this isn't working for me.

Any idea how to resolve this?

In the svg tag insert this: xmlns="http://www.w3.org/2000/svg"

Like this:

<svg xmlns="http://www.w3.org/2000/svg" id="example-1" viewBox="0 0 12 12">

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM