English 中文(简体)
How to link from SVG?
原标题:
  • 时间:2009-11-29 18:15:03
  •  标签:
  • svg
  • xlink

What I tried is this

<a xlink:target="http://ponyoverflow.com">
  <text class="text" x="20" y="718" text-anchor="start">Mail Order Ponies</text>
</a>

and variations with href and type="simple".

The link text appears, but the link is not clickable. I tried Firefox 3.5.5, Chromium, Inkscape and GNOME Image Viewer.

Is there anything wrong with the syntax and if not is there any application that supports links in SVG?

最佳回答

Try this:

<a xlink:href="http://ponyoverflow.com">
  <text class="text" x="20" y="718" text-anchor="start">Mail Order Ponies</text>
</a>

...and make sure you have an attribute xmlns:xlink="http://www.w3.org/1999/xlink" on the svg root element.

问题回答

暂无回答




相关问题
How to simplify SVG code?

Is it possible to simplify / clean up svg code by replacing the use-tags with standard svg elements? Maybe an inkscape plugin? Haven t found anything... Background: I m converting some svgs to javafx ...

How to link from SVG?

What I tried is this <a xlink:target="http://ponyoverflow.com"> <text class="text" x="20" y="718" text-anchor="start">Mail Order Ponies</text> </a> and variations with href ...

Ruby Support for SVG

Is there some library or helper to produce SVG graphics with Ruby? I googled a bit and found many, but all seem to be dusty and very incomplete… Does anyone know about some nice, reliable alternative?

Mangling IDs and References to IDs in XML

I m trying to compose xml elements into each other, and the problem I am having is when there s the same IDs. Basically what I need to do is mangle all the IDs in an xml file, as well as the ...

热门标签