WordPress主题B2美化:添加会员开通展示模块

演示效果

自定义占位符图片

第一步

在你的首页模块header.php合适位置添加,或者b2主题设置模块管理,首页模块中添加自定义模块,加如下代码

<div id="jkindex_vip" class="j-modules-inner jktjvip">
<section class="litheme-section litheme-modules modules-pricing-table" id="modules-48">
<ul class="pricing-table pt-style-2 cols-3">

<li class="pt-item pt-item-1 active">
<div class="vip_tj" style="background:;"></div> 
<div class="pt-header">
<h3 class="pt-title">体验会员</h3>
<span class="pt-desc"></span>
<div class="pt-price-wrap">
<span class="pt-sign">¥</span>
<span class="pt-price">6.6</span>
<span class="pt-unit">欢迎加入</span>
</div>
</div>
<div class="pt-content">
<p style="text-align: center;">特权服务</p>
<ul>
<li>设计尊贵会员标识</li>
<li>获得(5次/天)下载网站资源</li>
<li>设计无推广返利</li>
<li>设计商店无折扣</li>
</ul>
</div>
<div class="pt-box">
<a class="btn btn-lg pt-btn" href="/vips" rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow" >立即赞助</a>
<div class="b2tooltip" id="b2tooltip">一款带有复古气息的免贵可商用中文黑体</div>
</div>
</li>
<li class="pt-item pt-item-1 active">
<div class="vip_tj" style="background:#00c18e;"> 本 站 推 荐</div> 
<div class="pt-header">
<h3 class="pt-title">青铜会员</h3>
<span class="pt-desc"></span>
<div class="pt-price-wrap">
<span class="pt-sign">¥</span>
<span class="pt-price">39</span>
<span class="pt-unit">欢迎加入</span>
</div>
</div>
<div class="pt-content">
<p style="text-align: center;">特权服务</p>
<ul>
<li>设计尊贵会员标识</li>
<li>获得(10次/天)下载网站资源</li>
<li>设计推广返利使者</li>
<li>可享受设计商店95折扣</li>
</ul>
</div>
<div class="pt-box">
<a class="btn btn-lg pt-btn" href="/vips" rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow" >立即赞助</a>
<div class="b2tooltip" id="b2tooltip">一款带有复古气息的免贵可商用中文黑体</div>
</div>
</li>
<li class="pt-item pt-item-1 active">
<div class="vip_tj" style="background:;"></div> 
<div class="pt-header">
<h3 class="pt-title">黄金会员</h3>
<span class="pt-desc"></span>
<div class="pt-price-wrap">
<span class="pt-sign">¥</span>
<span class="pt-price">99</span>
<span class="pt-unit">欢迎加入</span>
</div>
</div>
<div class="pt-content">
<p style="text-align: center;">特权服务</p>
<ul>
<li>设计尊贵会员标识</li>
<li>获得(20次/天)下载网站资源</li>
<li>设计推广返利使者</li>
<li>可享受设计商店95折扣</li>
</ul>
</div>
<div class="pt-box">
<a class="btn btn-lg pt-btn" href="/vips" rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow" >立即赞助</a>
<div class="b2tooltip" id="b2tooltip">一款带有复古气息的免贵可商用中文黑体</div>
</div>
</li>
<li class="pt-item pt-item-1 active">
<div class="vip_tj" style="background:;"></div> 
<div class="pt-header">
<h3 class="pt-title">设计会员</h3>
<span class="pt-desc"></span>
<div class="pt-price-wrap">
<span class="pt-sign">¥</span>
<span class="pt-price">299</span>
<span class="pt-unit">欢迎加入</span>
</div>
</div>
<div class="pt-content">
<p style="text-align: center;">特权服务</p>
<ul>
<li>设计尊贵会员标识</li>
<li>获得无限下载网站资源</li>
<li>设计推广返利使者</li>
<li>可享受设计商店8折扣</li>
</ul>
</div>
<div class="pt-box">
<a class="btn btn-lg pt-btn" href="/vips" rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow" >立即赞助</a>
</div>
</li>
</ul>
</section>
</div>

第二步

在自定义css中添加以下样式

/*LOGO套餐*/
@media screen and (max-width: 768px){
#jkindex_vip{
    display: none;
}
}
span.pt-xianshi {
    font-size: 25px;
    color: red;
}
.jktjvip {
    display: flow-root;
    box-sizing: content-box;
    max-width: 1500px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0px;
    padding-right: 0px;
}
#modules-48 {
    margin-top: 30px;
    margin-bottom: 0px;
}
.pricing-table {
    display: flex;
    padding-left: 0;
    justify-content: space-around;
    list-style: none;
}
ol, ul {
    box-sizing: border-box;
}
/*.pricing-table.pt-style-2 .pt-item {
    border: 0;
    border-top: 10px solid #fff0;
    border-radius: 18px;
}*/
.pricing-table .pt-item {
    position: relative;
    flex: 1;
    margin-right: 30px;
    background: #ffffff75;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    transition: all .3s;
}
li.pt-item.pt-item-1.active {
    overflow: hidden!important;
}
.pricing-table.pt-style-2 .pt-header {
    padding: 38px 0;
    text-align: center;
    color: rgba(0,0,0,.8);
    background: 0 0;
}
.pricing-table.pt-style-2 .pt-price-wrap {
    padding-top: 26px;
    color: var(--b2color);
}
.pricing-table.pt-style-2 .pt-price-wrap .pt-price, .pricing-table.pt-style-2 .pt-price-wrap .pt-sign {
    font-size: 40px;
    line-height: 1;
}
.pricing-table .pt-price {
    font-size: 40px;
    font-weight: 600;
    line-height: 1;
}
.pricing-table .pt-header {
    margin: -1px;
    border-radius: 8px 8px 0 0;
    color: #fff;
    background-color: var(--b2color);
}
.pricing-table.pt-style-2 .pt-content {
    position: relative;
    padding-bottom: 134px;
}
.pricing-table .pt-content {
    overflow: hidden;
    padding: 24px 12%;
    font-size: 16px;
    line-height: 1.47;
    color: rgba(0,0,0,.8);
}
.pricing-table.pt-style-2 .pt-box {
    bottom: 40px;
}
.pricing-table.pt-style-2 .pt-content:before {
    position: absolute;
    left: 12%;
    top: 0;
    width: 76%;
    height: 1px;
    background: rgba(0,0,0,.1);
    content: "";
}
.pricing-table .pt-box {
    position: absolute;
    bottom: 30px;
    left: 50%;
    width: 100%;
    transform: translateX(-50%);
    text-align: center;
    color: rgba(0,0,0,.8);
}
.pricing-table.pt-style-2 .pt-title {
    margin: 0;
    font-size: 20px;
}
table.pt-style-2 .pt-price-wrap .pt-sign {
    font-size: 50px;
    line-height: 1;
}
.pricing-table.pt-style-2 .pt-unit {
    display: block;
    margin-top: 3px;
    font-size: 16px;
    color: rgba(0,0,0,.4);
    font-weight: 400;
}
.pricing-table.pt-style-2 .pt-content ol li, .pricing-table.pt-style-2 .pt-content ul li {
    padding-left: 0;
    padding-right: 27px;
}
element.style {
}
.pricing-table.pt-style-2 .pt-content ol li, .pricing-table.pt-style-2 .pt-content ul li {
    padding-left: 0;
    padding-right: 27px;
}
.pricing-table .pt-content ol li, .pricing-table .pt-content ul li {
    position: relative;
    margin-top: 16px;
    padding-left: 22px;
    text-align: left;
    list-style: none;
    color: rgba(0,0,0,.6);
}
#modules-48 .pricing-table.pt-style-2 .pt-content li:before {
    background-image: url(//img.sjcnh.cn/images/jktheme/vipiconhover.svg);
}
.pricing-table.pt-style-2 .pt-content ol li:before, .pricing-table.pt-style-2 .pt-content ul li:before {
    position: absolute;
    right: 0;
    top: 0;
    width: 20px;
    height: 20px;
    content: "";
    background-size: 100% auto;
}
.pricing-table .pt-item:hover .pt-btn {
    padding: 8px 20px;
    color: #fff;
    border: 0;
    background: var(--b2color);
}
.pricing-table.pt-style-2 .pt-btn:before {
    position: absolute;
    z-index: -1;
    left: 0;
    top: 0;
    bottom: 0;
    right: 0;
    background: var(--b2color);
    opacity: .2;
    border: 0;
    content: "";
}
.btn:not(.go-up) {
    border-radius: 3px;
    white-space: normal;
    font-size: .875rem;
}
.pricing-table.pt-style-2 .pt-btn {
    position: relative;
    padding-top: 8px;
    padding-bottom: 8px;
    color: var(--b2color);
    z-index: 0;
    border: 0;
}
.btn:not(:disabled):not(.disabled) {
    cursor: pointer;
}
.btn-lg {
    padding: 11px 20px;
    font-size: 14px;
    line-height: 16px;
    border-radius: 4px;
}
.pricing-table .pt-btn {
    margin: 24px auto 0;
    width: 50%;
    color: rgba(0,0,0,.8);
    border: 1px solid rgba(0,0,0,.8);
    border-radius: 8px;
    font-size: 15px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pricing-table.pt-style-2 .pt-item:hover {
    border: solid 1px #c1e0ff;
    box-shadow: 1px 1px 7px 2px #00c18e78;
    /*border-top-color: var(--b2color);
    box-shadow: 0 15px 40px 0 rgb(0 0 0 / 15%);
    z-index: 1;*/
}
.vip_tj {
    position: absolute;
    top: 22px;
    right: -40px;
    overflow: hidden!important;
    z-index: 1;
    width: 150px;
    height: 30px;
    color: #fff;
    line-height: 30px;
    -webkit-transform: rotate(45deg);
    transform: rotate(45deg);
    text-align: center;
    font-size: 14px;
}
/*
 * ------------------------------------------------------------------------------
 * 首页VIP介绍小工具CSS
 * ------------------------------------------------------------------------------
 */
 .van-home-homevip {
    padding: 100px 0;
    background-repeat: no-repeat;
}
@media screen and (max-width: 900px){
.van-home-homevip {
    padding: 40px 0;
}
}
@media (min-width: 960px){
.van-jktjvip {
    padding-left: 40px;
    padding-right: 40px;
}
}
@media (min-width: 640px){
.van-jktjvip {
    padding-left: 30px;
    padding-right: 30px;
}
}
.van-jktjvip {
    box-sizing: content-box;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}
.van-jktjvip::before, .van-jktjvip::after {
    content: "";
    display: table;
}
.van-home-title {
    text-align: center;
    margin-bottom: 60px;
}
@media screen and (max-width: 900px){
.van-home-title {
    margin-bottom: 40px;
}
}
.van-home-title span {
    font-size: 28px;
    font-weight: bold;
    color: #0B1D30;
}
@media screen and (max-width: 900px){
.van-home-title span {
    font-size: 18px;
}
}
.van-home-title p {
    font-size: 16px;
    font-weight: 400;
    color: #999999;
    margin-top: 20px;
}
@media screen and (max-width: 900px){
.van-home-title p {
    font-size: 14px;
}
}
.van-jktjvip >:last-child {
    margin-bottom: 0;
}
.van-home-homevip2-box {
}
.van-grid-medium{
    margin-left: -30px;
}
.van-grid {
    margin-left: -20px;
}
.van-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;
}
@media (min-width: 1200px){
.van-grid > * {
    padding-left: 20px;
}
}
[class*='van-width'] {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}
@media (min-width: 640px){
.van-width {
    width: 50%;
}
}
.van-grid-medium > * {
    padding-left: 30px;
}
.van-grid > * {
    padding-left: 20px;
}
.van-grid > * {
    margin: 0;
}
.van-grid > * >:last-child {
    margin-bottom: 0;
}
@media screen and (max-width: 900px){
.home-homevip2-boxmk {
    padding: 20px;
}
}
.home-homevip2-boxmk {
    padding: 30px;
}
.van-dongtai {
    transition: all .3s;
}
.van-background-default {
    background-color: #fff;
}
.van-flex {
    display: flex;
}
.van-flex-1 {
    flex: 1;
}
.home-homevip2-boxmk .title i {
    display: block;
    font-size: 14px;
    line-height: 27px;
    background-color: #f0506e17;
    color: #f0506e;
    border-radius: 50px;
    width: 100px;
    text-align: center;
}
@media screen and (max-width: 900px){
.home-homevip2-boxmk .title span {
    font-size: 20px;
}
}
.home-homevip2-boxmk .title span{
    font-size: 30px;
    margin-top: 20px;
    display: block;
    font-weight: bold;
    color: #333;
}
.home-homevip2-boxmk .i{
    width: 60px;
    line-height: 60px;
    text-align: center;
    height: 60px;
    border-radius: 50px;
    display: inline-block;
    background: #fff;
    font-size: 30px !important;
    box-shadow: 0px 15px 60px rgba(54, 127, 255, 0.1);
    transition: box-shadow .2s;
}
.home-homevip2-boxmk .title p{
    padding-top: 15px;
}
.home-homevip2-boxmk:hover .i{
    box-shadow: 0 0 0 10px rgba(198, 209, 255, 0.45), 0 0 0 24px rgba(197, 209, 255, 0.22);
    border-radius: 100%;
}
.home-homevip2-boxmk .an{
    margin-top: 20px;
    height: 33px;
    line-height: 33px;
}
.home-homevip2-boxmk .an a {
    display: inline-block;
    text-align: center;
    font-size: 14px;
    width: 110px;
    height: 33px;
    line-height: 33px;
    color: #fff;
    border-radius: 4px;
    background: #006fff;
}
@media screen and (max-width: 900px){
.home-homevip2-boxmk .an .jg {
    font-size: 20px;
}
}
.home-homevip2-boxmk .an .jg{
    font-size: 30px;
    font-weight: bold;
    color: #333;
}
.home-homevip2-boxmk .an .jg em{
    font-size: 14px;
    font-weight: 400;
    margin-left: 3px;
    color: #777;
}
em, cite, i {
    font-style: normal;
}
@media (max-width: 640px){
.van-width {
    margin-top: 20px;
}
.van-grid > * {
    padding-left: 0px;
}
}

最后强制刷新浏览器以查看效果,样式自行调整

尊重版权丨本站注明原创的插件,购买者不得随意分享传播,仅限个人使用,一旦发现拉黑用户,删除使用权限。大神建站-WordPress插件开发 » WordPress主题B2美化:添加会员开通展示模块

相关文章

评论 (0)