如何在Jupyter Lab中更改活动单元的布局? [英] How to change the layout of an active cell in Jupyter Lab?

查看:205
本文介绍了如何在Jupyter Lab中更改活动单元的布局?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当前,活动单元除了侧面显示的蓝色条形以外没有其他变化.

Currently, the active cell doesn't change apart from a blue bar showing on the side.

如果活性细胞更突出,那将是很好的.例如,如何像Jupyter笔记本中的边框那样在单元格周围有边框?还是将背景更改为更深的灰色?

It would be good if the active cell was more prominent. For example, how can I have a border around the cell like the border in Jupyter notebook? Or change the background to a darker grey?

推荐答案

一个选项是创建一个包含内容的文件custom.css:

One option is to create a file custom.css with the content:

<style>
    .jp-mod-active .jp-CodeMirrorEditor {
        border: var(--jp-border-width) solid var(--jp-cell-editor-active-border-color);
    }
</style>

然后,运行以下命令:

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

现在活动单元格将具有蓝色边框:

And now the active cell will have a blue border:

这篇关于如何在Jupyter Lab中更改活动单元的布局?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆