演示图:
教程开始:
1.找到/wp-content/themes/ripro/parts/home-mode/lastpost.php并找到以下代码
<h3 class="section-title"><span><?php echo $mo_postlist_no_cat['home_title_s'];?></span></h3>
2.然后把上面的代码替换成下面的
<div class="HhCooltitle">
<span>NEWS</span>
<div class="HhChTitle">
<strong>最新</strong>
<strong>发布</strong>
</div>
</div>
3.找到wp-content/themes/ripro/assets/css/diy.css并将如下代码复制到diy.css中
/*首页最新发布标题美化*/
.HhCooltitle {
position: relative;
margin-bottom: 38px;
display: flex;
-webkit-box-align: center;
align-items: center;
-webkit-box-pack: center;
justify-content: center;
line-height: 1;
}
.HhCooltitle:before {
margin-right: 10px
}
.HhCooltitle:after {
margin-left: 10px
}
.HhCooltitle:before, .HhCooltitle:after {
content: "";
display: inline-block;
width: 8px;
height: 8px;
background: linear-gradient(-90deg, #b108ff 0%, #364cfd 100%);
border-radius: 50%;
}
.HhCooltitle span {
font-family: Futura;
background: linear-gradient(-125deg, #c000ff 0%, #2954fd 100%);
-webkit-background-clip: text;
color: transparent;
font-size: 49px;
letter-spacing: 5px;
display: inline-block;
font-weight: 700;
}
.HhCooltitle .HhChTitle {
font-size: 20px;
}
.HhCooltitle .HhChTitle strong {
display: block;
font-size: 20px;
background: linear-gradient(-90deg, #b108ff 0%, #364cfd 100%);
-webkit-background-clip: text;
color: transparent;
}
.HhcatboxDes {
position: absolute;
opacity: 0;
z-index: 1;
align-items: center;
display: flex;
font-size: 16px;
height: 180px;
justify-content: center;
width: 100%;
color: #fff;
font-weight: 600;
background: #00000070;
-webkit-transition: all 0.35s ease-in-out;
-moz-transition: all 0.35s ease-in-out;
transition: all 0.35s ease-in-out;
-webkit-transform: translateY(100%);
-webkit-transform: translateY(100%);
-moz-transform: translateY(100%);
-ms-transform: translateY(100%);
-o-transform: translateY(100%);
transform: translateY(100%);
}
.HhCooltitle {
margin-top: 10px
}
/*首页最新发布标题美化*/