2012-09-17 27 views
2

将SVG-image-element与本地源(例如C:\image.png)和Internet上的源(例如http://www.google.de/intl/de_ALL/images/logos/images_logo_lg.gif)一起使用时,语法有差异吗?使用本地资源的SVG <image>元素的语法

我的问题是,下面的工作:

<image x="100" y="100" width="100" height="100" xlink:href="http://www.google.de/intl/de_ALL/images/logos/images_logo_lg.gif"> 
</image> 

,并与下面的,我只是得到一个白色的页面:

<image x="100" y="100" width="100" height="100" href="C:\google.png"></image> 

回答

3

你试过"file:///c:/google.png"

+0

我尝试: “<图像x =” 100" y = “100” 宽度= “100” HEIGHT = “100” HREF = “文件:/// C:\ google.png”>“ 但仍然不起作用! – user1665232

+0

您可能需要用正斜杠替换反斜杠:'“file:// C:/ Documents and Settings/Benjbra/workspace/PythTest/google.png”'。有关更多信息,请参见http://en.wikipedia.org/wiki/File_URI_scheme#Windows_2。 – skunkfrukt

0

我想你应该尝试使用file://协议

采取远程页面,并做了保存网页为对铬,看看他做的图像标记是什么操作。

0

问题解决了...:

<image x="100" y="100" width="100" height="100" xlink:href="file://C:\google.png"></image> 

谢谢!