想要的样子

/*页面布局*/
#home {
     margin: 0 auto;
     width: 95%;/*原始65*/
     min-width: 980px;/*页面顶部的宽度*/
     padding: 30px;
     margin-top: 20px;
     margin-bottom: 50px;
     box-shadow: 0 2px 6px rgba(100, 100, 100, 0.3);
 }
/*页面布局结束*/

/*
 代码高亮开始,使用了一个叫Monokai Sublime的黑色主题皮肤,直接拿过来还不行,有一些样式冲突,还要自己稍微改一些地方
Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-license.org/
*/
.cnblogs-markdown .hljs {
    display: block;
    overflow-x: auto;
    /*padding: 1.6em 3em !important;*/
    padding: 0.5em !important; 
    font-size: 14px !important;
    background: #272822 !important;
    color: #FFF;
    /*max-height: 700px;*/
}
 
.hljs,
.hljs-tag,
.hljs-subst {
    color: #f8f8f2;
}
 
.hljs-strong,
.hljs-emphasis {
    color: #a8a8a2;
}
 
.hljs-bullet,
.hljs-quote,
.hljs-number,
.hljs-regexp,
.hljs-literal,
.hljs-link {
    color: #ae81ff;
}
 
.hljs-code,
.hljs-title,
.hljs-section,
.hljs-selector-class {
    color: #a6e22e;
}
 
.hljs-strong {
    font-weight: bold;
}
 
.hljs-emphasis {
    font-style: italic;
}
 
.hljs-keyword,
.hljs-selector-tag,
.hljs-name,
.hljs-attr {
    color: #f92672;
}
 
.hljs-symbol,
.hljs-attribute {
    color: #66d9ef;
}
 
.hljs-params,
.hljs-class .hljs-title {
    color: #f8f8f2;
}
 
.hljs-string,
.hljs-type,
.hljs-built_in,
.hljs-builtin-name,
.hljs-selector-id,
.hljs-selector-attr,
.hljs-selector-pseudo,
.hljs-addition,
.hljs-variable,
.hljs-template-variable {
    color: #e6db74;
}
 
.hljs-comment,
.hljs-deletion,
.hljs-meta {
    color: #75715e;
}
/*黑色主题皮肤结束*/

代码块收尾记得加“```”

感谢:
如何自定义博客园代码高亮主题,同时分享自己使用的黑色主题

猜你喜欢

转载自www.cnblogs.com/coderoom/p/12207852.html