我是github的新手,README.md想要使用Iframe显示HTML内容,或者这可能是什么?
我试过的是我只是创建HTML标签,然后锚定,这是行不通的.
laz*_*tem 21
正如mjgpy3所回答的那样,你可以包含html - 不需要<html>标签,但它会在显示之前进行清理,并且允许的唯一标签位于此白名单中.
该清单目前包括:
h1 h2 h3 h4 h5 h6 h7 h8 br b i strong em a pre code img tt div ins del sup sub p ol ul table thead tbody tfoot blockquote dl dt dd kbd q samp var hr ruby rt rp li tr td th s strike summary details caption figure figcaption abbr bdo cite dfn mark small span time wbr
但没有iframe.
您可以使用 svg 来解决,示例代码 (./path/example.svg):
<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg">
<foreignObject width="100" height="100">
<div xmlns="http://www.w3.org/1999/xhtml">
<ul>
<li>text</li>
</ul>
<!-- Other embed HTML element/text into SVG -->
</div>
</foreignObject>
</svg>
Run Code Online (Sandbox Code Playgroud)
然后使用图像插入方式将 svg 文件嵌入到任何其他 Markdown 文件中,如下所示:

Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
43773 次 |
| 最近记录: |