1
据我所知,通过使用<foreignObject />
标签,可以在SVG内添加HTML标签。 我想通过使用iframe内部的SVG加载页面,但它没有工作。我错过了什么吗?或者它不可能使用HTML内部SVG?SVG内部的iframe没有加载
这是我的代码:
<svg xmlns="http://www.w3.org/2000/svg">
<foreignObject x="0" y="0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;">
<iframe src="content.html" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></iframe>
</foreignObject>
</svg>
我试图直接从浏览器中加载它,它说明不了什么。
[SVG foreignObject内容不显示,除非纯文本]可能重复(http://stackoverflow.com/questions/13848039/svg-foreignobject-contents-do-not-display-unless-plain-text) – nvl 2014-10-01 07:01:39