在 GitHub 风格的 Markdown 中将图像浮动到 table 旁边
Float an image next to a table in GitHub-flavored Markdown
在 this README.md (raw code at the top of this page) 的顶部,我试图在 Markdown table 旁边浮动一张图片。我在 img
中对 float
样式 属性 和 align
属性所做的努力没有成功。
你的 table 有 width:100%
并且不会让任何其他元素。尝试将其宽度更改为 width :auto
并从块显示为 display:inline-block
。另外,将图像容器更改为 display:inline-block
只要您的文档托管在 GitHub 上,您就不能。
如 GitHub 的 Markup 库中所述,在 Markdown 转换为 HTML 后,...
HTML is sanitized, aggressively removing things that could harm you and your kin—such as script
tags, inline-styles, and class
or id
attributes. See the sanitization filter for the full whitelist.
换句话说,您在 "style" 文档的 Markdown 中包含的任何内容(style
标签、内联样式等)都将被消毒剂去除。如果您想控制文档的外观和样式,则需要将它们托管在您可以完全控制的地方。 GitHub不是那个地方。
在 this README.md (raw code at the top of this page) 的顶部,我试图在 Markdown table 旁边浮动一张图片。我在 img
中对 float
样式 属性 和 align
属性所做的努力没有成功。
你的 table 有 width:100%
并且不会让任何其他元素。尝试将其宽度更改为 width :auto
并从块显示为 display:inline-block
。另外,将图像容器更改为 display:inline-block
只要您的文档托管在 GitHub 上,您就不能。
如 GitHub 的 Markup 库中所述,在 Markdown 转换为 HTML 后,...
HTML is sanitized, aggressively removing things that could harm you and your kin—such as
script
tags, inline-styles, andclass
orid
attributes. See the sanitization filter for the full whitelist.
换句话说,您在 "style" 文档的 Markdown 中包含的任何内容(style
标签、内联样式等)都将被消毒剂去除。如果您想控制文档的外观和样式,则需要将它们托管在您可以完全控制的地方。 GitHub不是那个地方。