本文介绍了如何使用Markdown在GitHub README中渲染多个列?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

要在三列中呈现项目,我尝试将以下CSS3指令添加到我的项目的 README.md 文件,但样式被删除:

To render items in three columns, I attempted to add the following CSS3 directives to my project's README.md file, but the styling was stripped out:

<div style="-webkit-column-count: 3; -moz-column-count: 3; column-count: 3; -webkit-column-rule: 1px dotted #e0e0e0; -moz-column-rule: 1px dotted #e0e0e0; column-rule: 1px dotted #e0e0e0;">
    <div style="display: inline-block;">
        <!-- first column's content -->
    </div>
    <div style="display: inline-block;">
        <!-- second column's content -->
    </div>
    <div style="display: inline-block;">
        <!-- third column's content -->
    </div>
</div>

这种样式在GitHub处理Markdown之外可以正常工作。如何将数据放入Markdown文档中的多个列?注意,我不关心IE浏览器的支持,不在乎IE是否渲染单个列(我的软件项目不能在Windows客户端上工作。)

This styling works correctly outside of GitHub's processing of Markdown. How can I put data into multiple columns in a Markdown document? Note that I am not concerned about support for IE browsers and don't care if IE renders a single column (my software project does not work on Windows clients, anyway).

推荐答案

GitHub-Flavored Markdown 中列入白名单的标签和属性:

GitHub-Flavored Markdown only permits certain whitelisted tags and attributes in inline HTML:

我们支持的标记和属性的完整列表可以在。

A full list of our supported tags and attributes can be found in the README for github/markup.

关于< div> 标签,README说只有 itemscope 除了一般属性白名单之外, itemtype 属性已列入白名单:

Regarding <div> tags, that README says that only the itemscope and itemtype attributes are whitelisted, in addition to the general attribute whitelist:

没有标签支持 style 属性。

除非你能够与自述文件中列出的标签和属性一起添加一些东西,否则你会发现

Unless you can hack something together with the tags and attributes listed in that README I think you'll find that you're out of luck.

另一种方法是将网站,这似乎更灵活。

An alternative would be to put together a GitHub Pages site, which seems to be much more flexible.

这篇关于如何使用Markdown在GitHub README中渲染多个列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-20 03:36