我看到了一些使用foreignObject
SVG 图像制作动画等的例子。
我想在我的 GitHub README 中创建一个侧边栏导航。我这样做了:https ://codepen.io/fourneauxthibaut/pen/jOLXjKJ
这是我在 Markdown 中的尝试:
<foreignObject>
<svg fill="none" viewBox="0 0 400 400" width="400" height="400" xmlns="http://www.w3.org/2000/svg">
<foreignObject width="100%" height="100%">
<div xmlns="http://www.w3.org/1999/xhtml">
<style>
//code
</style>
<div id="grid">
//code
</div>
</div>
</foreignObject>
</svg>
</foreignObject>
可能吗?还是我应该放弃这个想法并采用“正常”的 README 风格?