js悬浮在线咨询

.w100 {
 width: 100%;
 margin: 0px auto;
 float: left;
 background-color: #000;
}
.main {
 width: 1200px;
 margin: 0px auto;
 line-height: 22px;
}
.xfqq {
        border-radius: 5px;
        box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.4);
        margin: 5px auto;
        line-height: 40px;
        position: fixed;
        z-index: 999999;
        text-align: left;
        top: 30%;
        margin-left:20px;
    }
.xfqqtxt {
    background: #000 none repeat scroll 0% 0%;
    opacity: 0.8;
    width:220px;
    height:301px;
    float:left;
    border:1px solid #ccc;
    text-align:center;
}
.xfqqtxt span {
    float:left;
    width:220px;
    color:#ccc;
}
 
<script type="text/javascript">
    function onover() {
        var hidexx = document.getElementById('hidexx');
        var showxx = document.getElementById('showxx');
        var xfxx = document.getElementById('xfxx');
        hidexx.style.display = "block";
        showxx.style.display = "none";
        xfxx.style.display = "block";
    }
    function onout() {
        var hidexx = document.getElementById('hidexx');
        var showxx = document.getElementById('showxx');
        var xfxx = document.getElementById('xfxx');
        hidexx.style.display = "none";
        showxx.style.display = "block";
        xfxx.style.display = "none";
    }
</script>
 
<div class="w100">
        <div class="main">
            <div class="xfqq">
                <div onmousedown="onover()" id="showxx">
                    <img src="{APP_PATH}statics/images/web/xfqq.jpg" alt="服务热线" width="48" height="48" border="0" />
                </div>
                <div onmousedown="onout()" id="hidexx" style="display: none;">
                    <img src="{APP_PATH}statics/images/web/xfqq.jpg" alt="服务热线" width="48" height="48" border="0" />
                </div>
                <div class="xfqqtxt" id="xfxx" style="display: none;">
                    <span>服务热线</span>
                    <hr />
                    <span>0317-999999999</span>
                    <img src="{APP_PATH}statics/images/web/weixin.jpg" alt="扫一扫,加我微信" width="142" height="139" border="0" />
                    <span>扫一扫,加我微信</span>
                </div>
            </div>
        </div>
    </div>
 
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值