How to render multiple columns with Markdown in GitHub README?

前端 未结 1 1855
臣服心动
臣服心动 2020-12-03 23:39

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:

         


        
相关标签:
1条回答
  • 2020-12-03 23:51

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

    HTML

    You can use a subset of HTML within your READMEs, issues, and pull requests.

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

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

    abbr, accept, accept-charset, accesskey, action, align, alt, axis, border, cellpadding, cellspacing, char, charoff, charset, checked, cite, clear, cols, colspan, color, compact, coords, datetime, dir, disabled, enctype, for, frame, headers, height, hreflang, hspace, ismap, label, lang, longdesc, maxlength, media, method, multiple, name, nohref, noshade, nowrap, prompt, readonly, rel, rev, rows, rowspan, rules, scope, selected, shape, size, span, start, summary, tabindex, target, title, type, usemap, valign, value, vspace, width, itemprop

    No tags support the style attribute.

    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.

    0 讨论(0)
提交回复
热议问题