我使用php在Svg上应用链接它在chrome中工作但在firefox中不起作用

时间:2016-06-03 09:08:22

标签: php redirect svg

这是我的代码:

<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
     viewBox="0 0 990 400" style="enable-background:new 0 0 990 400;" xml:space="preserve">
<?php  
$pid=1;
echo"
<a href='plot_details.php?pid=$pid'>
<g id='Layer_2'>
    <rect id='XMLID_1_' x='15.4' y='14.3' class='st0' width='87' height='133.7'/>
</g>
</a>";
</svg>

当我将鼠标悬停在chrome中时,它会显示链接,但不会显示在Firefox中。需要帮忙。

1 个答案:

答案 0 :(得分:0)

Firefox尚不支持SVG 2 href属性,它只支持SVG 1.1 xlink:href属性。

SVG 2标准正在进行中,不同的UA实现了它的不同部分。新标准需要时间才能完成,并且UA需要时间来支持它。