如何將一個 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>
廣告