Emlog模板文章H标签美化
优化emlog默认的H标签,过于单调。通过几行代码解决它。

代码:
代码导入:css文件中。
目录:F12 查看文章标题所提示的 CSS,在末尾处添加即可
section.context {
padding: 15px;
word-wrap: break-word;
min-height: 100px;
}
section.context.context-album {
padding:15px 0
}
.context h1,.context h2,.context h3 {
font-weight:700;
border-width: 1px 0 1px 3px;
border-style: solid
}
.context h4,.context h5,.context h6 {
border-width:1px 0 1px 3px;
border-style:solid
}
.context h1:nth-child(6n+0),.context h2:nth-child(6n+0),.context h3:nth-child(6n+0),.context h4:nth-child(6n+0),.context h5:nth-child(6n+0) {
border-color:#EEE #EEE #EEE #DE4387
}
.context h1:nth-child(6n+1),.context h2:nth-child(6n+1),.context h3:nth-child(6n+1),.context h4:nth-child(6n+1),.context h5:nth-child(6n+1) {
border-color:#EEE #EEE #EEE #AE74EC
}
.context h1:nth-child(6n+2),.context h2:nth-child(6n+2),.context h3:nth-child(6n+2),.context h4:nth-child(6n+2),.context h5:nth-child(6n+2) {
border-color:#EEE #EEE #EEE #4527A0
}
.context h1:nth-child(6n+3),.context h2:nth-child(6n+3),.context h3:nth-child(6n+3),.context h4:nth-child(6n+3),.context h5:nth-child(6n+3) {
border-color:#EEE #EEE #EEE #4AD868
}
.context h1:nth-child(6n+4),.context h2:nth-child(6n+4),.context h3:nth-child(6n+4),.context h4:nth-child(6n+4),.context h5:nth-child(6n+4) {
border-color:#EEE #EEE #EEE #63CEEF
}
.context h1:nth-child(6n+5),.context h2:nth-child(6n+5),.context h3:nth-child(6n+5),.context h4:nth-child(6n+5),.context h5:nth-child(6n+5) {
border-color:#EEE #EEE #EEE #EC8E4A
}
.context h1 {
font-size:22px;
line-height:32px;
margin:0 -15px 10px;
padding:0 15px;
background:#fafafa
}
.context h2 {
font-size:20px;
line-height:30px;
margin:0 -15px 10px;
padding:0 15px;
background:#fafafa
}
.context h3 {
font-size:18px;
line-height:28px;
margin:0 -15px 10px;
padding:0 15px;
background:#fafafa
}
.context h4 {
font-size:16px;
line-height:26px;
margin:0 -15px 10px;
padding:0 15px;
background:#fafafa
}
.context h5 {
font-size:14px;
line-height:24px;
margin:0 -15px 10px;
padding:0 15px;
background:#fafafa
}
.context h6 {
font-size:12px;
line-height:22px;
margin:0 -15px 10px;
padding:0 15px;
background:#fafafa
}
调用:
在模板目录下找文件名为:“echo_log.php”的文件
<?php echo $log_content; ?> 【可以搜部分代码找到文件】
前面添加代码:
<section class="context">