html - Markdown 中的 Span 元素

标签 html css markdown

我用下面几行代码写了一个markdown.md。

<span style="font-family: Open Sans; font-weight: 300; font-size: 16px; font-style: normal">300 Light normal hamburgefonstiv</span>
<br /> <span style="font-family: Open Sans; font-weight: 300; font-size: 16px;font-style: italic">300 Light italic hamburgefonstiv</span>
<br /> <span style="font-family: Open Sans; font-weight: 400; font-size: 16px; font-style: normal">400 Regular normal hamburgefonstiv</span>
<br /> <span style="font-family: Open Sans; font-weight: 400; font-size: 16px;font-style: italic">400 Regular italic hamburgefonstiv</span>
<br /> <span style="font-family: Open Sans; font-weight: 600; font-size: 16px; font-style: normal">600 Semibold normal hamburgefonstiv</span>
<br /> <span style="font-family: Open Sans; font-weight: 600; font-size: 16px;font-style: italic">600 Semibold italic hamburgefonstiv</span>
<br /> <span style="font-family: Open Sans; font-weight: 700; font-size: 16px; font-style: normal">700 Bold normal hamburgefonstiv</span>
<br /> <span style="font-family: Open Sans; font-weight: 700; font-size: 16px;font-style: italic">700 Bold italic hamburgefonstiv</span>
<br /> <span style="font-family: Open Sans; font-weight: 800; font-size: 16px; font-style: normal">800 ExtraBold normal hamburgefonstiv</span>
<br /> <span style="font-family: Open Sans; font-weight: 800; font-size: 16px;font-style: italic">800 ExtraBold italic hamburgefonstiv</span>

当我打开浏览器时,我看到了这个。它工作正常。当我在 Github 上打开 markdown.md 时,我只看到文本行作为普通文本。怎么了?带有 span 元素的想法是否正确?

enter image description here

最佳答案

虽然GitHub的markdown规范支持some HTML , 目前完全不支持 CSS。参见 here :

GitHub strips style tags and attributes preventing you from changing the style on their pages. This is probably for security reasons. If you could inject css into GitHub pages, you could easily launch a phishing attack.

关于html - Markdown 中的 Span 元素,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46110178/

相关文章:

css repeat-y 在 IE8 中不工作

javascript - 如何使用获取结果状态栏打开 Jquery 自动完成

javascript - 在没有 exclude_matches/globs 的情况下排除 Chrome 扩展中的域或提高 Javascript CSS 性能?

javascript - Ghost 代码 Markdown block 中的行号

python - 如何使用类似列表的类型通过 string.Template python 生成 markdown?

html - 使用 Doxygen 内联显示图像

php 表单提交不适用于 iphone

html - 嵌套 flex 盒高度与最大高度

html - 我们可以在另一个 div 中使用垂直对齐图像吗

html - 调整浏览器大小时如何使div不中断