5

我使用以下几行来更改降价单元格的样式

from IPython.core.display import HTML
with open( './custom.css', 'r' ) as f: style = f.read()
HTML( style )

该文件custom.css包含行

<style>
   div.text_cell_render {font-family: "Times New Roman", Times, serif;}
</style>

这在中按预期工作jupyter-notebook(它更改了降价的默认字体),但在jupyter-lab.

我该怎么做?

4

1 回答 1

3

JupyterLab 使用的 CSS 类集与 jupyter-notebook 不同。

要定位要使用jp-MarkdownOutput类的降价单元格,例如:

<style>
   div.jp-MarkdownOutput {font-family: "Times New Roman", Times, serif;}
</style>

您可以在文档中阅读有关 JupyterLab 中 CSS 的更多信息。

于 2018-11-02T15:09:01.517 回答