未显示<rect>内的SVG <img/>

时间:2017-01-05 13:54:53

标签: html xml image svg xhtml

在html页面中,我有这个简单的.svg代码:

<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 841.9 1190.6" xml:space="preserve">
<rect id="image-test" x="0" y="0" width="250" height="250" fill="none">
    <image width="250px" height="250px" href="https://pbs.twimg.com/profile_images/1450222519/logosf_positif_03_icon.png" />
</rect></svg>

即使我对xlink:href节点使用<image />,图像仍然不会显示。图像的网址有效且图片存在:https://pbs.twimg.com/profile_images/1450222519/logosf_positif_03_icon.png。但是图像似乎显示在<rect />节点之外,在根<svg />内。我的代码出了什么问题?

0 个答案:

没有答案
相关问题