栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

jupyter notebook美化

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

jupyter notebook美化

简介

由于 jupyter notebook 的界面不是很好看,所以抽时间折腾了修改了一下。

效果图

更改方法

修改 jupyter notebook 以下位置的样式文件:

python根目录/lib/site-packages/notebook/static/custom/custom.css

将样式修改为如下



#notebook-container {
    width: 100%;
}


#header div#menubar-container,
#header div#header-container {
    width: 99%;
    padding: 0;
}


div#notebook{
    padding-top: 0;
}


div.input_area {
    border-radius: 10px;
    width: 93%;
}


div.cell.selected, div.cell.selected.jupyter-soft-selected {
    border: none;
}


div.cell.selected:after, div.cell.selected.jupyter-soft-selected:after {
    position: absolute;
    display: block;
    top: -1px;
    right: -1px;
    width: 5px;
    height: calc(100% + 2px);
    content: '';
    background: #42A5F5;
}


div.output_area pre {
    width: 93%;
}


div#notebook {
    font-family: san francisco, "PingFangSC-Medium", "Microsoft YaHei";
    line-height: 20px;
    -webkit-font-smoothing: antialiased !important;
}

div#notebook h1 {
    color: #9900ff;
}

div#notebook h2 {
    color: #007aff;
}

div#notebook h3 {
    color: #ff9900;
}

div#notebook h4 {
    color: #ffee00;
}
div#notebook h5 {
    color: #00ff2f;
}


div#notebook blockquote{
    background-color: #f8f8f8;
    color: #505050;
    padding: 8.5px;
    margin: 0.5em -0.5em 0.5em -0.4em;
}


div#notebook p code, div#notebook li code {
    font-family: Consolas, "PingFangSC-Medium", "Microsoft YaHei";
    font-size: 1em !important;
    color: #111111;
    border: 0.5px solid #cfcfcf;
    border-radius: 2px;
    background-color: #f7f7f7;
    padding: .1em .2em;
    margin: 0px 2px;
}


div.text_cell_render pre {
    border: 1px solid #cfcfcf;
    border-radius: 2px;
    background: #f7f7f7;
    line-height: 1.21429em;
    padding: 8.5px;
    margin: 0.5em -0.5em 0.5em -0.4em;
}
div.text_cell_render code {
    background: #f7f7f7;
}


div.CodeMirror-code {
    font-family: Consolas, "PingFangSC-Medium", "Microsoft YaHei";
    font-size: 13pt;
    line-height: 145%;
    -webkit-font-smoothing: antialiased !important;
}


div.output pre {
    font-family: Consolas, "PingFangSC-Medium", "Microsoft YaHei";
    line-height: 20px;
    -webkit-font-smoothing: antialiased !important;
}


span.cm-comment {
    font-family: san francisco, "PingFangSC-Medium", "Microsoft YaHei" !important;
    font-style: normal !important;
}
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/998165.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号