方法:复制代码加到template/wap/top.html文件底部,或在后台广告管理中添加手机版首页头部广告,类型选择代码
代码:
<style type="text/css">
.kf_fixedsubscribe_box { display: -webkit-box; display: -webkit-flex; min-height: 50px; width:100%; box-sizing: border-box; background: rgba(0,0,0,0.6); position: fixed; top: 0; left: 0; z-index: 99999; display: flex; align-items:center; justify-content:space-between; padding: 0px 10px; }
.kf_fixedsubscribe_box .left { display: flex; align-items:center;}
.kf_fixedsubscribe_box .qrcode img { width: 40px; height: 40px; }
.kf_fixedsubscribe_box .text { height: 40px; line-height: 20px; font-size:14px; padding-left: 10px; color: #fff; overflow: hidden; }
.kf_fixedsubscribe_box .text p { margin: 0px; padding: 0px; }
.kf_fixedsubscribe_box .right {width: 105px; padding: 12px 0 12px 5px; display: flex; align-items:center;}
.kf_fixedsubscribe_box .button {width: 60px; height: 26px; line-height: 26px; font-size: 14px; text-align: center; color: #fff; background: #ff7f00; border-radius: 2px; }
.kf_fixedsubscribe_box .close {width: 40px; height: 26px; position: relative;;}
.kf_fixedsubscribe_box .close::before, .kf_fixedsubscribe_box .close::after { transform: rotate(45deg); -moz-transform: rotate(45deg); -o-transform: rotate(45deg); -ms-transform: rotate(45deg); -webkit-transform: rotate(45deg); content: ''; position: absolute; height: 1px; width: 18px; background: #FFF; top: 12px; right: 10px; }
.kf_fixedsubscribe_box .close::before { transform: rotate(135deg); -moz-transform: rotate(135deg); -o-transform: rotate(135deg); -ms-transform: rotate(135deg); -webkit-transform: rotate(135deg); }
.kf_fixedsubscribe_box1{ color:#444444; background-color:#FFFFFF; text-align: center; overflow: hidden;}
.kf_fixedsubscribe_box1 .title{ font-size: 20px; line-height: 35px; color: #000000; margin-top: 15px;}
.kf_fixedsubscribe_box1 .title em{ background: url("/images/ico_title1.png") no-repeat 0px 10px; margin: 0px 5px; background-size: 20px; display: inline-block; width: 25px; height: 24px;}
.kf_fixedsubscribe_box1 .title em:last-of-type{background-image: url("/images/ico_title2.png");}
.kf_fixedsubscribe_box1 .title1{ font-size: 14px; line-height: 20px; color: #ed414a; margin-bottom: 10px;}
.kf_fixedsubscribe_box1 .qrcode{ width: 200px; margin: auto;}
.kf_fixedsubscribe_box1 .qrcode img{ width: 200px;}
</style>
<section class="kf_fixedsubscribe_box">
<div class="left">
<div class="qrcode"><img src="https://www.kfenlei.com/images/ico_qrcode.jpg"></div>
<div class="text">
<p>${WebName}【公众号】</p>
<p>关注公众号,即时获取最新通知。</p>
</div></div>
<div class="right">
<div class="button" onclick="ktishi({text:'<div class=\'kf_fixedsubscribe_box1\'><div class=\'title\'><em></em>谢谢你的关注<em></em></div><div class=\'qrcode\'><img src=\'/template/images/qrcode/gzh.png\'></div><div class=\'title1\'>长按二维码关注“${WebName}”公众号</div><div>'})">关注</div>
<div class="close" onClick="$(this).parent().parent().hide();"></div>
</div>
</section>