4
我想获得一个SVG对象(欧洲地图)与7个国家被选为特定页面的链接。添加多个链接到一个SVG对象
在我的SVG文件,我裹着这应该是与这个一般语法链接的每个多边形或路径:
<a xlink:href="http://www.google.com">
<polygon class="lebanon" id="lebanon2" points="249.1,157.2 249.8,157.4 251.7,157.3 252.3,156.1 253.1,156.1 253.9,154.7 254.4,153.1 255.5,152.5 256.1,152.5 256.7,152.2 256.3,151.3 256.4,149.7 255.4,149.2 254.8,147.9 252.4,147.8 252.4,148.1 251.6,148.3 251.3,152.5 250.3,154 249.3,155.4 249.3,157"/>
</a>
然而,在页面加载,U收到以下错误:
This page contains the following errors:
error on line 32 at column 15: Namespace prefix xlink for href on a is not defined
Below is a rendering of the page up to the first error.
我如何得到这个工作?
我认为你使用HTML5?如果是的话,我倾向于说默认情况下应该知道** xlink **命名空间。请参阅[HTML5规范](http://www.w3.org/TR/2011/WD-html5-20110405/namespaces.html)。也许你的文件不被识别为HTML5? – rmoestl