gpt4 book ai didi

html - Markdown 中的 Span 元素

转载 作者:搜寻专家 更新时间:2023-10-31 08:14:15 30 4
gpt4 key购买 nike

我用下面几行代码写了一个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/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com