博客风格配置
博客风格配置
前言
最早开始配置博客风格应该是在20年左右,参考了其他人的风格配置教程,因为时间久远,也不知道具体都参考了哪些了
不过有点印象的是,当时应该是打开了开发者工具,然后通过查看具体文字所对应的css选择器信息,去尝试修改风格的

当前配置内容
博客皮肤
皮肤使用的是 SimpleMemory ,直到现在,它仍然是除了默认皮肤之外,使用量最高的一款皮肤

页面定制CSS代码
/* 字体使用的 google fonts 字体, fonts.loli.net 使其支持国内访问 */
@import url('https://fonts.loli.net/css?family=ZCOOL+KuaiLe|ZCOOL+QingKe+HuangYou|ZCOOL+XiaoWei&display=swap');
@import url('https://fonts.loli.net/css?family=Long+Cang&display=swap');
@import url('https://fonts.loli.net/css?family=Ubuntu+Mono&display=swap');
@import url('https://fonts.loli.net/css?family=Patrick+Hand&display=swap');
<link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/4.6.1/css/bootstrap.css" rel="stylesheet">
/* 下面这部分内容应该是直接参考别人的,自己改了一些颜色等内容 */
#home {
margin: 0 auto;
margin-top: 0px;
margin-bottom: 0px;
margin-top: 0px;
margin-bottom: 0px;
width: 80%;
min-width: 950px;
background-color: #fff;
padding: 30px;
margin-top: 50px;
margin-bottom: 50px;
box-shadow: -5px 0 3px blueviolet, 0 0 10px black;
}
#blogTitle h1 a {
color: #515151;
font-size: 30px;
}
#navList a:hover {
color: blueviolet;
text-decoration: none;
padding-top: 15px;
}
#blogTitle h1 a:hover {
color: blueviolet;
}
#sideBar h3 {
font-size: 25px;
}
.catListTitle {
font-weight: bold;
line-height: 1.2;
font-size: 110%;
margin-top: 10px;
margin-bottom: 10px;
text-align: left;
border-left: solid 10px blueviolet;
padding-left: 10px;
}
#mainContent {
min-height: 200px;
padding: 0px 0px 10px 0;
*padding-top: 10px;
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
overflow: hidden;
float: right;
margin-left: -22em;
width: 100%;
}
#sideBar {
margin-top: -15px;
width: 230px;
min-height: 200px;
padding: 0px 0 0px 5px;
padding-right: 0px;
padding-left: 5px;
float: left;
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
overflow: hidden;
}
.postTitle a:hover {
margin-left: 30px;
color: blueviolet;
text-decoration: none;
}
.entrylistPosttitle a:hover {
margin-left: 30px;
color: blueviolet;
text-decoration: none;
}
.day {
min-height: 10px;
_height: 10px;
margin-bottom: 20px;
padding-bottom: 5px;
position: relative;
border: blueviolet 5px solid;
padding: 10px 20px;
border-radius: 20px;
}
.entrylistItem {
min-height: 20px;
_height: 20px;
margin-bottom: 20px;
padding-bottom: 10px;
padding-top: 10px;
border: solid 5px blueviolet;
padding-left: 20px;
padding-right: 20px;
border-radius: 20px;
width: auto;
margin-top: 10px;
}
#cnblogs_post_body h3 {
font-size: 16px;
font-weight: bold;
line-height: 1.5;
margin: 20px 0 10px 0;
}
#cnblogs_post_body table {
margin-top: 1em;
}
#navList a:link, #navList a:visited, #navList a:active {
color: #6a6a6a;
font-weight: bold;
transition: all 0.2s linear 0s;
}
div#cnblogs_post_body h1, div#cnblogs_post_body h2, div#cnblogs_post_body h3, div#cnblogs_post_body h4, div#cnblogs_post_body h5, div#cnblogs_post_body h6 {
color: blueviolet;
}
.postBody blockquote {
background: none;
min-height: 35px;
_height: 35px;
line-height: 1.6em;
color: #333;
box-shadow: -2px 3px 7px 1px blueviolet;
margin: 10px 5px 10px 5px;
}
.postBody a:link,
.postBody a:visited {
color: rgb(139 195 74);
}
#author_profile a {
color:blueviolet;
}
/* 代码高亮css开始 */
pre {
/*控制代码不换行*/
white-space: pre;
word-wrap: normal;
}
/*
Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-license.org/
*/
.cnblogs-markdown .hljs {
display: block;
overflow-x: auto;
padding: 0.5em !important;
background: #23241f !important;
color: #f8f8f2;
font-family: "yahei consolas hybrid", 'Ubuntu Mono', monospace, consolas, console, "Courier New" !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;
}
.cnblogs-markdown code, .cnblogs-post-body code {
font-family: "yahei consolas hybrid", 'Ubuntu Mono', monospace, consolas, console, "Courier New" !important;
font-size: 12px !important;
line-height: 20px;
background-color: #f5f5f5 !important;
border: 1px solid #ccc !important;
padding: 0 5px !important;
border-radius: 3px !important;
line-height: 1.8;
margin: 1px 5px;
vertical-align: middle;
display: inline-block;
color: blueviolet;
}
/* 代码高亮css结束 */
/* google font 开源字体 */
#cnblogs_post_body p {
margin: 10px auto;
text-indent: 0;
font-family: "微软雅黑", sans-serif;
font-size: 14px;
}
div#cnblogs_post_body h1, div#cnblogs_post_body h2, div#cnblogs_post_body h3, div#cnblogs_post_body h4, div#cnblogs_post_body h5, div#cnblogs_post_body h6 {
color: blueviolet;
font-family: 'ZCOOL XiaoWei';
}
/* 主页副标题字体 */
#blogTitle h2 {
font-weight: normal;
font-size: 25px;
line-height: 1.846153846;
color: #757575;
float: left;
font-family: 'Long Cang';
}
/* 主页主标题字体 */
#blogTitle h1 a {
color: #515151;
font-size: 30px;
font-family: 'ZCOOL XiaoWei';
}
.day .postTitle a {
padding-left: 10px;
font-family: 'ZCOOL XiaoWei';
}
.postTitle a {
font-family: 'ZCOOL XiaoWei';
}
#navList a:link, #navList a:visited, #navList a:active {
color: #6a6a6a;
font-weight: bold;
transition: all 0.2s linear 0s;
font-family: 'ZCOOL XiaoWei';
font-size: larger;
}
#cnblogs_post_body .en {
font-family: 'Patrick Hand';
font-weight: bolder;
color: #333;
}
/* 水平线 (---) */
hr {
margin: 2em 0;
height: 3px;
background-image: linear-gradient(to right, red 0%, red 17%, orange 17%, orange 34%, yellow 34%, yellow 50%, green 50%, green 67%, blue 67%, blue 84%, purple 84%, purple 100%);
border-width: 0;
}
/* 有序列表 <ol> */
#cnblogs_post_body ol, #cnblogs_post_body ul {
font-family: '微软雅黑', sans-serif;
}

浙公网安备 33010602011771号