2014-04-03 134 views
0
  1. 目前,我正在使用D3,但是當我嘗試將圖像SVG放入不顯示在Firefox上的矩形中時。那是生成的代碼:svg rect圖像不顯示在Firefox上

    <g transform=translate(3,2)"> 
        <svg viewBox="0 0 300 200"> 
        <rect class="background" x="0" width="58" height="80" style="fill: #80a2cb"></rect> 
        <image class="img" href="https://trac.openstreetmap.org/export/6357/subversion/applications/share/map-icons/svg/vehicle/motorbike.svg" x="0" width="58" height="80"></image> 
        </svg> 
        </g> 
    

謝謝您的幫助。

回答

1

該圖像「href」需要是「xlink:href」。

0

嘗試增加引號來變換屬性:

<g transform="translate(3,2)">