SVG图像标记在Firefox或IE中不起作用

SVG图像标记在Firefox或IE中不起作用,svg,Svg,以下SVG标记在Firefox25或IE10中没有显示任何内容。它在铬合金中工作。我做错了什么,在这里 test.html <!DOCTYPE html> <html> <head> <title></title> <script type="text/javascript"> </script> </head> <body> <svg w

以下SVG
标记在Firefox25或IE10中没有显示任何内容。它在铬合金中工作。我做错了什么,在这里

test.html

<!DOCTYPE html>
<html>
  <head>
    <title></title>
    <script type="text/javascript">
    </script>
  </head>
  <body>
    <svg width="4in" height="3in" version="1.1" viewBox="0 0 500 500"
        xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
      <image x="50" y="50" width="100px" height="100px" xlink:href="test.svg"></image>
    </svg>
  </body>
</html>

test.svg

<svg xmlns="http://www.w3.org/2000/svg"
   version="1.1"
   width="463.85715"
   height="375.28571"
   id="svg2">
  <g
     id="layer1">
    <rect
       width="462.85715"
       height="374.28571"
       x="145.71429"
       y="80.933617"
       id="rect2985"
       style="fill:#ff0000;fill-opacity:1;stroke:#000000;stroke-opacity:1" />
  </g>
</svg>

问题在于svg文件中的根元素需要一个
viewBox
属性。这就是我从正在处理的测试用例中删除Inkscape代码的结果…

问题是svg文件中的根元素需要一个
viewBox
属性。这就是我从正在编写的测试用例中删除Inkscape代码所得到的