修改b2/Modules/Templates/Modules/Posts.php 146行下面添加以下代码
<div class="item-author">
<div class="item-bg">
<i class="thumb thumb-a"></i>
</div>
</div>
css样式
.b2_gap>li .item-in, .shop-list-item, .shop-normal-item-in, .user-search-list li>div, .home-collection .home-collection-content, .post-3.post-3-li-dubble .b2_gap>li .item-in, .item-in {
overflow: hidden;
transition: all .3s ease-in-out;
padding: 10px;
border-radius: 15px;
}
.post-module-thumb {
position: relative;
height: 0;
overflow: hidden;
z-index: 1;
}
.item-author .item-bg .thumb-a {
background-image: linear-gradient(120deg, #f6d365 0%, #fda085 100%);
}
.item-author .item-bg .thumb {
padding-top: 50%;
position: absolute;
left: -31.25px;
right: -31.25px;
top: -31.25px;
width: auto;
}
.thumb {
display: block;
width: 100%;
height: 0;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
background-color: transparent;
position: relative;
overflow: hidden;
transition: all .2s;
}
.item-author .item-bg::after {
content: '';
display: block;
position: absolute;
left: 0;
right: 0;
bottom: 0%;
padding-top: 11%;
background-image: -webkit-linear-gradient(top,rgba(255,255,255,0.7) 0%,#FFFFFF 100%);
background-image: linear-gradient(180deg,rgba(255,255,255,0.7) 0%,#FFFFFF 100%);
}
.item-author .item-bg::before {
content: '';
display: block;
position: absolute;
left: 0;
right: 0;
bottom: 0;
/* padding-top: 58%; */
/* background-color: #fff; */
z-index: 1;
}
.item-author .item-bg {
position: absolute;
left: 0;
right: 0;
top: 0;
padding-top: 40%;
overflow: hidden;
}
欢迎访问秀主题博客,分享简单实用WP教程