当使用 python-markdown 时,什么决定了“最终”结果?页面的外观?

发布于 2024-12-23 01:53:51 字数 179 浏览 3 评论 0原文

当使用 python-markdown 时,什么决定了最终外观页面?

即,我需要更改什么,例如,更重要的是,将 H1 标题的颜色从黑色更改为浅蓝色?

When using python-markdown what determines the final look of the page?

I.e. what do I need to change, for example and more importantly where, to let's say, change the color of the H1 headers from black to light blue?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

小鸟爱天空丶 2024-12-30 01:53:51

正如 @JBernardo 在他的评论中指出的,你需要一些 CSS。这意味着,由于 python-markdown 的 HTML 输出不包含任何样式,因此您必须自己将其添加到 HTML 文档中,最简单的方法是使用 CSS。

为此,只需确保在 HTML 中添加对 CSS 文件的引用,或者在 HTML 文档中包含整个样式即可。您可以在此处找到有关如何执行此操作的更多信息。

关于你的问题,要在 CSS 中设置 h1 颜色,你需要做的就是:

h1 { color: <color> }

As @JBernardo pointed out in his comment you'll need some CSS. This means that since the HTML output from python-markdown doesn't contain any style, you have to add it yourself to the HTML document and the easiest way to do that is with CSS.

To do that, just make sure that you add a reference to the CSS file in the HTML or that you include the whole style in the HTML document. You'll find more information about how to do that here.

With regard to your question, to set h1 color all you need in your CSS is something as:

h1 { color: <color> }
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文