问题
I have a table with the following code. The markdown viewer and on github pages the color is shown correct. But not on github.
|- |- |- |- |- |
| <span style="font-family: Source Code Pro; padding: 20px; background-color: #000000; color: #fff;">#000000</span> |
The result on Github
The result on Github Pages
A table has the disadvantage that it does not move downwards at smaller screen sizes, but only to the right. How can I create a kind of grid layout
回答1:
Within GitHub, Markdown content is somewhat restricted. After Markdown is converted to HTML
The 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.
(Bold added.)
The span
tag is not included in the whitelist. Even if it was, the style
attribute is also missing from the whitelist. The only way I know to achieve a visual similar to what's on GitHub Pages is to use an image, as you have done here.
来源:https://stackoverflow.com/questions/46211657/github-markdown-and-colors