编辑custom.css
文件即可修改字体和美化Notebook,windows下路径为\venv\Lib\site-packages\notebook\static\custom\custom.css
,修改后内容如下:
/*
Placeholder for custom user CSS
mainly to be overridden in profile/static/custom/custom.css
This will always be an empty file
*/
.CodeMirror pre {font-family: Consolas, "Microsoft YaHei Mono", "Microsoft YaHei"; font-size: 10pt;}
* {font-family: Consolas, "Microsoft YaHei Mono", "Microsoft YaHei";}
div.output_area pre {font-family: Consolas, "Microsoft YaHei Mono", "Microsoft YaHei"; font-size: 10pt;}
div.input_prompt {font-family: Consolas, "Microsoft YaHei Mono", "Microsoft YaHei"; font-size: 10pt;}
div.out_prompt_overlay {font-family: Consolas, "Microsoft YaHei Mono", "Microsoft YaHei"; font-size: 10pt;}
div.prompt {font-family: Consolas, "Microsoft YaHei Mono", "Microsoft YaHei"; font-size: 10pt;}
span.cm-comment {font-family: Consolas, "Microsoft YaHei Mono", "Microsoft YaHei" !important; font-style:normal !important; color:#FFAE3C !important;}
code {font-family: Consolas, "Microsoft YaHei Mono", "Microsoft YaHei";}
.rendered_html code {
border: 0;
padding: 2px 4px;
color:#c7254e;
background-color: #f2f2f2;
font-size: 100%;
}
.container { width:98% !important; }
修改后效果:
修改字体后效果
版权声明:本文为「txfly」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://www.jianshu.com/p/9d39b8ebf478
网友评论