gpt4 book ai didi

html - 如何使用 ReStructured Text (rst2html.py) 在文本中使用颜色或如何插入没有空行的 HTML 标签?

转载 作者:技术小花猫 更新时间:2023-10-29 11:44:57 26 4
gpt4 key购买 nike

如何将颜色用于 ReStructured Text?例如,**hello**翻译成<strong>hello</strong> .我怎样才能让 ReStructure(rst2html.py) 将 something 翻译成 <font color="####">text</font>

我考虑过 ..raw::html,但它引入了空行。我想插入没有空行的 HTML 标记。

最佳答案

我发现这个方法有效

首先,你有这个角色。

.. role:: red

An example of using :red:`interpreted text`

翻译成如下。

<p>An example of using <span class="red">interpreted text</span></p>

现在,你有了红色类,你可以使用 CSS 来改变颜色。

.red {
color:red;
}

关于html - 如何使用 ReStructured Text (rst2html.py) 在文本中使用颜色或如何插入没有空行的 HTML 标签?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4669689/

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