博客园首页css代码(包括markdown代码部分着色背景)
有细微修改
/*字体*/
body,html,input
{
font: 16px;
line-height: 1.5;
font-family: consolas,arial,\5FAE\8F6F\96C5\9ED1,sans-serif;
}
/*首部背景*/
#header {
background: #000;
}
#mainContent {
width: auto;
float: none;
margin-right: 270px;
font-size: 16px;
}
#navigator {
width: 100%;
height: 60px;
line-height: 60px;
overflow: hidden;
}
#blog_stats {
margin-right: 20px;
}
#navList a {
height: auto;
font-family: '微软雅黑';
font-weight: normal;
margin-left: -20px;
}
#navList a :hover{
text-decoration:none;
}
#navList a:hover:after {
display:none;
}
#navList a:link {
color: #bbb;
}
#main {
width: auto;
position: relative;
padding-left: 10px;
}
#mainContent {
width: auto;
float: none;
margin-right: 270px;
font-size: 16px;
}
#mainContent .forFlow {
float: none;
width: auto;
}
.day {
padding: 5px 20px 10px 20px;
}
.dayTitle {
height: 55px;
top: 0;
padding-top: 10px;
text-shadow: none;
font-size: 80%;
text-align: center;
font-weight: normal;
width: 64px;
color: #666;
line-height: 1.5em;
clear: both;
position: absolute;
left: -80px;
background: #fff;
border-radius: 7px 7px 7px 7px;
box-shadow: 1px 1px 2px #a7a8ad;
text-indent: 9px;
}
.postTitle a:link{
color:#2EB1E8;
text-decoration: none;
}
.postTitle{
border-bottom:1px solid #e0e0e0;
font-weight:normal;
font-size:18px;
font-family:'微软雅黑';
line-height:40px;
width:100%;
clear:both;
}
.postCon {
font-size: 16px;
}
.c_b_p_desc {
line-height: 23px;
}
.postDesc {
padding-bottom: 5px;
}
.day:after {
left: -8px;
}
#sideBar {
position: absolute;
right: 10px;
top: 0;
}
#topics .postTitle a {
line-height: 35px;
font-size: 18px;
font-weight: normal;
text-shadow: none;
}
#topics .postTitle a {
color:#2EB1E8;
font-family: '微软雅黑';
}
/*随笔行高*/
.postBody {
font-size: 16px;
line-height: 1.6em;
}
#cnblogs_post_body {
line-height: 2!important;
}
#cnblogs_post_body p, .postBody p{
line-height: 2!important;
}
/*改变链接的颜色和无下划线*/
#cnblogs_post_body a {
text-decoration: none;
color: blue;
}
div.commentform textarea {
width: 600px;
height: 150px;
font-size: 13px;
border: 1px solid #ccc;
font-family: 'PingFang SC','Helvetica Neue','Helvetica','consolas',sans-serif;
color: #fff;
background: #eef2f3;
text-shadow: 1px 1px 0 rgba(0,0,0,.3);
}
#green_channel {
font-size: 10px;
text-align: center;
}
#green_channel {
padding: 0px 0;
margin-bottom: 0px;
margin-top: 0px;
border: #fff 1px dashed;
font-size: 12px;
width: auto;
text-align: center;
}
#green_channel a {
padding: 3px 8px;
text-decoration: none;
font-weight: bold;
cursor: pointer;
margin-right: 10px;
-moz-border-radius: 5px;
}
#green_channel a {
background: none;
padding: 3px 8px;
color: #fff;
text-decoration: none;
font-weight: bold;
cursor: pointer;
margin-right: 10px;
-moz-border-radius: 5px;
-webkit-border-radius: 10px;
-moz-box-shadow: 0 1px 3px rgba(0,0,0,.5);
-webkit-box-shadow: 0 1px 3px rgba(255, 255, 255, 0);
text-shadow: 0 -1px 1px rgba(0, 0, 0, 0);
vertical-align: middle;
}
.postBody a:link, .postBody a:visited, .postBody a:active {
text-decoration: none;
}
/*隐藏新闻*/
.c_ad_block {
display: none;
}
#ad_t2 {
display: none;
}
/*代码高亮开始*/
pre {
/*控制代码不换行*/
white-space: pre-wrap;
word-wrap: normal;
}
.cnblogs-markdown .hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #23241f !important;
color: #FFF;
white-space: pre-wrap;
word-break: break-all;
font-family: "consolas",\5FAE\8F6F\96C5\9ED1,sans-serif !important;
}
.cnblogs-markdown .hljs {
font-family: "consolas",sans-serif !important;
font-size: 16px !important;
line-height: 1.5 !important;
padding: 10px !important;
}
.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;
}
/*黑色主题皮肤结束*/
旧版
/*字体*/
body,html,input
{
font: 12px;
line-height: 1.5;
font-family: consolas,arial,\5FAE\8F6F\96C5\9ED1,sans-serif;
}
/*首部背景*/
#header {
background: #000;
}
#mainContent {
width: auto;
float: none;
margin-right: 270px;
font-size: 16px;
}
/*隐藏博客标题栏*/
#blogTitle{
display:none;
}
#navigator {
width: 100%;
height: 60px;
line-height: 60px;
overflow: hidden;
}
#blog_stats {
margin-right: 20px;
}
#navList a {
height: auto;
font-family: '微软雅黑';
font-weight: normal;
margin-left: -20px;
}
#navList a :hover{
text-decoration:none;
}
#navList a:hover:after {
display:none;
}
#navList a:link {
color: #bbb;
}
#main {
width: auto;
position: relative;
padding-left: 10px;
}
#mainContent {
width: auto;
float: none;
margin-right: 270px;
font-size: 16px;
}
#mainContent .forFlow {
float: none;
width: auto;
}
.day {
padding: 5px 20px 10px 20px;
}
.dayTitle {
height: 55px;
top: 0;
padding-top: 10px;
text-shadow: none;
font-size: 80%;
text-align: center;
font-weight: normal;
width: 64px;
color: #666;
line-height: 1.5em;
clear: both;
position: absolute;
left: -80px;
background: #fff;
border-radius: 7px 7px 7px 7px;
box-shadow: 1px 1px 2px #a7a8ad;
text-indent: 9px;
}
.postTitle a:link{
color:#2EB1E8;
text-decoration: none;
}
.postTitle{
border-bottom:1px solid #e0e0e0;
font-weight:normal;
font-size:18px;
font-family:'微软雅黑';
line-height:40px;
width:100%;
clear:both;
}
.postCon {
font-size: 16px;
}
.c_b_p_desc {
line-height: 23px;
}
.postDesc {
padding-bottom: 5px;
}
.day:after {
left: -8px;
}
#sideBar {
position: absolute;
right: 10px;
top: 0;
}
#topics .postTitle a {
line-height: 35px;
font-size: 18px;
font-weight: normal;
text-shadow: none;
}
#topics .postTitle a {
color:#2EB1E8;
font-family: '微软雅黑';
}
/*随笔行高*/
.postBody {
font-size: 16px;
line-height: 1.6em;
}
#cnblogs_post_body {
line-height: 2!important;
}
#cnblogs_post_body p, .postBody p{
line-height: 2!important;
}
/*改变链接的颜色和无下划线*/
#cnblogs_post_body a {
text-decoration: none;
color: blue;
}
div.commentform textarea {
width: 600px;
height: 150px;
font-size: 13px;
border: 1px solid #ccc;
font-family: 'PingFang SC','Helvetica Neue','Helvetica','consolas',sans-serif;
color: #fff;
background: #eef2f3;
text-shadow: 1px 1px 0 rgba(0,0,0,.3);
}
#green_channel {
font-size: 10px;
text-align: center;
}
#green_channel {
padding: 0px 0;
margin-bottom: 0px;
margin-top: 0px;
border: #fff 1px dashed;
font-size: 12px;
width: auto;
text-align: center;
}
#green_channel a {
padding: 3px 8px;
text-decoration: none;
font-weight: bold;
cursor: pointer;
margin-right: 10px;
-moz-border-radius: 5px;
}
#green_channel a {
background: none;
padding: 3px 8px;
color: #fff;
text-decoration: none;
font-weight: bold;
cursor: pointer;
margin-right: 10px;
-moz-border-radius: 5px;
-webkit-border-radius: 10px;
-moz-box-shadow: 0 1px 3px rgba(0,0,0,.5);
-webkit-box-shadow: 0 1px 3px rgba(255, 255, 255, 0);
text-shadow: 0 -1px 1px rgba(0, 0, 0, 0);
vertical-align: middle;
}
.postBody a:link, .postBody a:visited, .postBody a:active {
text-decoration: none;
}
/*隐藏新闻*/
.c_ad_block {
display: none;
}
#ad_t2 {
display: none;
}
/*代码高亮开始*/
pre {
/*控制代码不换行*/
white-space: pre-wrap;
word-wrap: normal;
}
.cnblogs-markdown .hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #23241f !important;
color: #FFF;
white-space: pre-wrap;
word-break: break-all;
font-family: "consolas",\5FAE\8F6F\96C5\9ED1,sans-serif !important;
}
.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;
}
/*黑色主题皮肤结束*/
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· winform 绘制太阳,地球,月球 运作规律
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 上周热点回顾(3.3-3.9)
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人