如何美化 BlackLowKey 主题
推荐阅读:https://www.cnblogs.com/binbinbinz/p/14631351.html
孩子比较傻,折腾了半天才整出来,在这里记一下。
往 [页面定制 CSS 代码] 里写东西就行了
以下是几个示例:
body {
background-image: url(https://example.com/bg.png);
background-color: #1f1e33;
background-position: top center;
background-repeat: no-repeat;
background-size: cover;
}
#mainContent,#main{
background: rgba(255,255,255,0.7)
}
#navigator{
background-color: rgba(48,48,48,0.9)
}
#blog_post_info,#cnblogs_ch,#under_post_card1,#under_post_card2{
display: none
}
当然也可以往 [页首 HTML 代码] 里塞点东西,例如:
<link href='https://fonts.googleapis.com/css?family=Ubuntu' rel='stylesheet' type='text/css' />
<style type="text/css" >
.postTitle {
font-family : 'Ubuntu', sans-serif;
font-weight: 900;
font-size: 22px !important;
}
body {
background-image: url(https://img2023.cnblogs.com/blog/2336113/202307/2336113-20230726212525505-349967023.jpg);
background-color: #120714;
background-position: top center;
background-repeat: no-repeat;
background-size: cover;
}
#mainContent{background-color: rgba(255,255,255,0.6)}
#main {background-color: rgba(255,255,255,0.5)}
pre {background-color: rgba(255,255,255,0.3)!important;color:#000!important}
.hljs {background-color: rgba(255,255,255,0.5)!important;}
.navbar {background-color: rgba(255,255,255,0.8)}
#navigator {background-color: rgba(48,48,48,0.9)}
.postBody li, .postCon li {margin-bottom: 0em;}
#comment_nav,#tip_comment2,#green_channel,#cnblogs_ch,#cnblogs_c1,#under_post_card1,#under_post_card2{
display: none
}
#cnblogs_post_body p,.postCon{
font-family: 'Ubuntu','PingFang SC','Microsoft YaHei','Helvetica Neue','Helvetica','Arial',sans-serif;
font-size: 16px;
}
#cnblogs_post_body h1{
font-family: 'Ubuntu','PingFang SC','Microsoft YaHei','Helvetica Neue','Helvetica','Arial',sans-serif;
font-size: 32px;
}
#cnblogs_post_body h2{
font-family: 'Ubuntu','PingFang SC','Microsoft YaHei','Helvetica Neue','Helvetica','Arial',sans-serif;
font-size: 26px;
}
#cnblogs_post_body h3{
font-family: 'Ubuntu','PingFang SC','Microsoft YaHei','Helvetica Neue','Helvetica','Arial',sans-serif;
font-size: 22px;
}
#cnblogs_post_body h4{
font-family: 'Ubuntu','PingFang SC','Microsoft YaHei','Helvetica Neue','Helvetica','Arial',sans-serif;
font-size: 18px;
}
#cnblogs_post_body h5{
font-family: 'Ubuntu','PingFang SC','Microsoft YaHei','Helvetica Neue','Helvetica','Arial',sans-serif;
font-size: 16px;
}
.cnblogs-markdown :not(pre,div,td)>code, .blogpost-body :not(pre,div,td)>code{
font-family: "Consolas","Courier New",monospace,sans-serif;
font-size: 14px;
}
#cnblogs_post_body hr {
border-top: #333;
}
</style>