是否可以将视频插入svg文件(svg-edit editor)?我想使用svg-edit进行团队合作,目前缺少YouTube影片插入功能。我找到了一些示例,但它们不起作用,例如this link。您能否请我引用一些资源,将youtube视频嵌入到svg-edit中的svg文件中?
最佳答案
您可以使用以下元素嵌入html内容:
<foreignObject width="100" height="50"
requiredExtensions="http://www.w3.org/1999/xhtml">
<body xmlns="http://www.w3.org/1999/xhtml">
<p>Here is a paragraph that requires word wrap</p>
</body>
</foreignObject>
您需要指定宽度和高度,并在xmlns namespace 声明中包含标签xmlns =“http://www.w3.org/1999/xhtml”>
这是工作示例(在chrome中定位存在一些问题,因此最好在firefox中查看):
请参阅CodePen上@rafszul(@rafszul)撰写的Pen NES superAnotherWorld。
关于javascript - 将YouTube视频嵌入并在SVG-EDIT中应用文件共享系统,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26758523/