如何将HTML文件加载到画布中?
为此,可以使用SVG<foreignObject>元素。让我们看一个例子:
<svg xmlns = "http://www.w3.org/2000/svg">
<foreignObject x = "0" y = "0" height = "500" width = "500">
<body xmlns = "http://www.w3.org/1999/xhtml">
<p>DEMO</p>
<input type = "date"/>
</body>
</foreignObject>
</svg>