右侧客服代码 2

woodchen
2022-12-06 / 0 评论 / 2 阅读 / 正在检测是否收录...

样式图

HTML

<div class="suspension">
        <div class="suspension-box">
                <a href="javascript:;" class="a a-service "><i class="i"></i></a>
                <a href="javascript:;" class="a a-service-phone "><i class="i"></i></a>
                <a href="javascript:;" class="a a-qrcode"><i class="i"></i></a>
                <div class="d d-service">
                        <i class="arrow"></i>
                        <div class="inner-box">
                                <div class="d-service-item clearfix">
                                        <a href="tencent://message/?uin=44295105&Site=www.czl.net&Menu=yes" class="clearfix"><span class="circle"><i class="i-qq"></i></span><h3>客服1号</h3></a>
                                </div>
                                <div class="d-service-item clearfix">
                                        <a href="tencent://message/?uin=44295105&Site=www.czl.net&Menu=yes" class="clearfix"><span class="circle"><i class="i-qq"></i></span><h3>客服2号</h3></a>
                                </div>
                        </div>
                </div>
                <div class="d d-service-phone">
                        <i class="arrow"></i>
                        <div class="inner-box">
                                <div class="d-service-item clearfix">
                                        <span class="circle"><i class="i-tel"></i></span>
                                        <div class="text">
                                                <p>服务热线</p>
                                                <p class="red number">021-67892002</p>
                                                <p class="red number">152 21657515</p>
                                        </div>
                                </div>
                        </div>
                </div>
                <div class="d d-qrcode">
                        <i class="arrow"></i>
                        <div class="inner-box">
                                <div class="qrcode-img"><img src="https://cdn.czl.net/online_kefu/img/wap_ico.webp" alt=""></div>
                                <p>微信</p>
                        </div>
                </div>

        </div>
</div>
<script type="text/javascript" src="https://cdn.czl.net/online_kefu/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){

        /* ----- 侧边悬浮 ---- */
        $(document).on("mouseenter", ".suspension .a", function(){
                var _this = $(this);
                var s = $(".suspension");
                var isService = _this.hasClass("a-service");
                var isServicePhone = _this.hasClass("a-service-phone");
                var isQrcode = _this.hasClass("a-qrcode");
                if(isService){ s.find(".d-service").show().siblings(".d").hide();}
                if(isServicePhone){ s.find(".d-service-phone").show().siblings(".d").hide();}
                if(isQrcode){ s.find(".d-qrcode").show().siblings(".d").hide();}
        });
        
});        
</script>

CSS

/*悬浮链接*/
.suspension{position:fixed;z-index:55;right:0;bottom:200px;width:70px;height:auto;}
.suspension-box{position:relative;float:right;}
.suspension .a{display:block;width:44px;height:44px;background-color:#353535;margin-bottom:4px;cursor:pointer;outline:none;}
.suspension .a.active,
.suspension .a .i{float:left;width:44px;height:44px;background-image:url(https://cdn.czl.net/online_kefu/images/side_icon.png);background-repeat:no-repeat;}
.suspension .a-service .i{width:20px;height:20px;margin-top:12px;margin-left:12px;background-image:url(https://cdn.czl.net/online_kefu/images/suspension-bg.png);background-repeat:no-repeat;background-position:0 0;}
.suspension .a-service-phone .i{width:20px;height:20px;margin-top:12px;margin-left:12px;background-image:url(https://cdn.czl.net/online_kefu/images/suspension-bg.png);background-repeat:no-repeat;background-position:-27px 0;}
.suspension .a-qrcode .i{background-position:-44px 0;}
.suspension .d{display:none;width:200px;background:#f6f6f6;position:absolute;right:67px;min-height:40px;border-radius:3px;box-shadow:0px 2px 5px 0px rgba(161, 163, 175, 0.11);}
.suspension .d .arrow{position:absolute;width:8px;height:12px;background:url(https://cdn.czl.net/online_kefu/images/side_bg_arrow.png) no-repeat;right:-8px;top:31px;}
.suspension .d-service{top:0;}
.suspension .d-service-phone{top:34px;}
.suspension .d-qrcode{top:78px;}
.suspension .d .inner-box{padding:8px 15px;}
.suspension .d-service .d-service-item{border-bottom:none;}
.suspension .d-service-item .circle{width:44px;height:44px;border-radius:50%;overflow:hidden;background:#ffffff;display:block;float:left;margin:5px 0;}
.suspension .d-service-item .i-qq{width:44px;height:44px;background:url(https://cdn.czl.net/online_kefu/images/side_con_icon03.png) no-repeat center 15px;display:block;transition:all .2s;border-radius:50%;overflow:hidden;}
.suspension .d-service-item:hover .i-qq{background-position:center 3px;}
.suspension .d-service-item .i-tel{width:44px;height:44px;background:url(https://cdn.czl.net/online_kefu/images/side_con_icon02.png) no-repeat center center;display:block;}
.suspension .d-service-item h3{float:left;width:112px;line-height:44px;font-size:15px;margin:5px 12px 5px 0;color:#037ec6!important;}
.suspension .d-service-item .text{float:left;width:112px;line-height:15px;font-size:15px;margin-left:0 12px 0 0;}
.suspension .d-qrcode{text-align:center;}
.suspension .d-qrcode .inner-box{padding:8px 8px;}
.suspension .d-qrcode p{font-size:14px;color:black;margin:0 0;}
.suspension .number{color:#037ec6;}
0

评论 (0)

取消