Markdown中的Span元素

时间:2017-09-08 06:43:13

标签: 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

1 个答案:

答案 0 :(得分:4)

虽然GitHub的降价规范支持some HTML,但目前根本不支持CSS。见here

  

GitHub会删除样式标记和属性,阻止您更改   他们页面上的风格。这可能是出于安全原因。如果   你可以将CSS注入GitHub页面,你可以轻松启动一个   网络钓鱼攻击。