我的應用程序是在VML中,它允許我在VML標籤之間嵌入html。但VML只支持IE-8。現在我已經使用vectorconverter將VML轉換爲SVG。但SVG不允許在SVG標籤之間嵌入html標籤。搜索堆棧和谷歌我遇到使用foreignobject標籤,但它也只支持,直到IE-8。我也嘗試使用開關標籤放置在異物標籤上方,但它沒有奏效。有沒有什麼方法可以在SVG標籤之間嵌入html代碼,即下面。在此先感謝如何在SVG標籤之間嵌入html代碼
<html>
<head>
<meta charset="UTF-8">
<title>HTML inside SVG</title>
<style type="text/css"></style></head>
<body>
<svg width="500" height="300" style="border:1px red solid">
<switch>
<foreignobject class="node" x="46" y="22" width="100" height="100">
<div style="border:1px green solid">I'm a div inside a SVG.</div>
</foreignobject>
</switch>
</svg>
<div>Interesting! But you a Foreign Object.</div>
</body>
你或許可以完成你用的是什麼了SVG在CSS現在 – Yoda
你能不能給我一個例子 – nikalldway
給我的你正在嘗試做一個例子,我也許能 – Yoda