参考:https://blog.csdn.net/qq_42247018/article/details/113094031
在css文件添加以下内容:
/* Body */
/* #notebook-container {
width: 90%
} */
/* Markdown */
div#notebook {
font-family: san francisco, "PingFangSC-Medium", "Microsoft YaHei";
line-height: 20px;
-webkit-font-smoothing: antialiased !important;
}
/* Markdown - h2 */
div#notebook h2 {
color: #007aff;
}
/* Markdown - quote */
div#notebook blockquote{
background-color: #f8f8f8;
color: #505050;
padding: 8.5px;
margin: 0.5em -0.5em 0.5em -0.4em;
}
/* Markdown - code in paragraph */
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;
}
/* Markdown - code */
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;
}
/* Code */
div.CodeMirror pre {
font-family: Consolas, "PingFangSC-Medium", "Microsoft YaHei";
font-size: 11pt;
line-height: 140%;
-webkit-font-smoothing: antialiased !important;
}
/* Code - output */
div.output pre {
font-family: Consolas, "PingFangSC-Medium", "Microsoft YaHei";
line-height: 20px;
-webkit-font-smoothing: antialiased !important;
}
/* Code - comment */
span.cm-comment {
font-family: san francisco, "PingFangSC-Medium", "Microsoft YaHei" !important;
font-style: normal !important;
}2. Mac/* Body */
/* #notebook-container {
width: 90%
} */
/* Markdown - h2 */
div#notebook h2 {
color: #007aff;
}
/* Markdown - quote */
div#notebook blockquote{
background-color: #f8f8f8;
color: #505050;
padding: 8.5px;
margin: 0.5em -0.5em 0.5em -0.4em;
}
/* Markdown - code in paragraph */
div#notebook p code, div#notebook li code {
font-size: 1em !important;
color: #111111;
border: 0.5px solid #cfcfcf;
border-radius: 2px;
background-color: #f7f7f7;
padding: .1em .2em;
margin: 0px 2px;
}
/* Markdown - code */
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;
}
/* Code */
div.CodeMirror pre {
line-height: 140%;
}
/* Code - comment */
span.cm-comment, span.c1 {
font-style: normal !important;
}
/* Code - highlighting */
.cm-s-ipython .CodeMirror-cursor {
border-left: 1px solid #ff711a !important;
}
.cm-s-ipython span.cm-comment, span.c1 {
color: #8d8d8d !important;
}
.cm-s-ipython span.cm-atom {
color: #055be0 !important;
}
.cm-s-ipython span.cm-number, span.mi {
color: #ff8132 !important;
}
.cm-s-ipython span.cm-property {
color: #303030 !important;
}
.cm-s-ipython span.cm-attribute {
color: #303030 !important;
}
.cm-s-ipython span.cm-keyword, span.kn, span.k, span.ow, span.kc, span.bp {
color: #713bc5 !important;
font-weight: 520 !important;
}
.cm-s-ipython span.cm-string, span.s1, span.s2 {
color: #009e07 !important;
}
span.se, span.si {
color: #59c08d !important;
font-weight: normal !important;
}
.cm-s-ipython span.cm-meta {
color: #aa22ff !important;
}
.cm-s-ipython span.cm-operator, span.o {
color: #055be0 !important;
font-weight: bold !important;
}
.cm-s-ipython span.cm-builtin, span.nb {
color: #e22978 !important;
}
.cm-s-ipython span.cm-variable, span.nn, span.n {
color: #303030 !important;
font-weight: normal !important;
}
.cm-s-ipython span.cm-variable-2 {
color: #de143d !important;
}
.cm-s-ipython span.cm-variable-3 {
color: #aa22ff !important;
}
.cm-s-ipython span.cm-def {
color: #e22978 !important;
font-weight: normal !important;
}
.cm-s-ipython span.cm-error {
background: rgba(191, 97, 106, .40) !important;
}
.cm-s-ipython span.cm-tag {
color: #e22978;
}
.cm-s-ipython span.cm-link {
color: #ff8132 !important;
}
.cm-s-ipython span.cm-storage {
color: #055be0 !important;
}
.cm-s-ipython span.cm-entity {
color: #e22978 !important;
}
.cm-s-ipython span.cm-quote {
color: #009e07 !important;
}
div.CodeMirror span.CodeMirror-matchingbracket {
color: #1c1c1c !important;
background-color: rgba(30, 112, 199, .30) !important;
}
div.CodeMirror span.CodeMirror-nonmatchingbracket {
color: #1c1c1c !important;
background: rgba(191, 97, 106, .40) !important;
}
.cm-s-default .cm-hr {
color: #055be0 !important;
}