Sozi 是一个inkscape 扩展,当在支持svg 的网络浏览器中查看时,它允许像Prezi 一样平移/缩放svg 文件。 youtube 视频可以嵌入到 Prezi 中,我希望能够在 svg 中嵌入 youtube 视频(或任何类型的视频)。我知道可以在 svg 文档中创建 html 链接(并且inkscape 直接支持这一点)。有没有办法将视频(通过 iframe 或视频标签?)嵌入到 svg 中?
最佳答案
<foreignObject width="560" height="349">
<iframe xmlns="http://www.w3.org/1999/xhtml"
width="560" height="349"
src="http://www.youtube.com/embed/YOUR-MOVIE-ID"
frameborder="0"></iframe>
</foreignObject>
这应该够了吧。小心,xmlns
属性保留在 iframe 元素上。 foreignObject
是 explained here .
关于iframe - 可以在 svg 中嵌入 youtube 视频吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6134184/