我使用以下行来更改降价单元格的样式
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
中无效。
我该怎么做?
答案 0 :(得分:2)
JupyterLab使用的CSS类集与jupyter-notebook不同。
要定位要使用jp-MarkdownOutput
类的降价单元,例如:
<style>
div.jp-MarkdownOutput {font-family: "Times New Roman", Times, serif;}
</style>
您可以在the documentation的JupyterLab中阅读有关CSS的更多信息。