Jquery之客服

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Jquery之客服</title>

<style type="text/css">
    .box{width:120px;
         height:300px;
         left:0px;
         top:20%; 
         position:fixed; 
         background:blue;
         border-radius: 6px;
         padding:4px;}
    .click{position:absolute; 
           right:-25px;
           top:100px; 
           width:18px;
           height:100px;
           background-color:#00a0e8;
           border-radius: 6px 0px 0px 6px;
           text-align:center;
           padding:5px;
           color:white;}
    .box .kf{width:120px;
             height:240px;
              background:#FFF;
              border-radius: 6px;}
    a{width: 100%;
      height: 20px;
      font-size:12px;
      display: block;
      margin: 6px auto;
      text-align:center;
      color:gray;
      text-decoration:none;}
    .box .wy,.box .sj{width: 100%;
                      height:20px;
                      background:#FFF;
                      border-radius: 6px;}
    a:hover{color:blue;}
    
</style>
<script type="text/javascript" src=".../jquery-3.2.1/jquery-3.2.1.min.js"></script>
<script>
    $(document).ready(function(e) {
        //点击鼠标,显示客户
        $("#box").css('left','-130px');
        $("#click").click(
            function(){
                $(this).parent().animate({left:"0px"});
            }
        );
        //鼠标移动到上面,隐藏客服
        $("#click").mouseover(
            function(){
                $(this).parent().animate({left:"-130px"});
            }
        );
    });
</script>
</head>

<body>

<div id="box" class="box">
    <label id="click" class="click">在线客服</label>
    <div id="kf" class="kf">
        <a href="#">在线客服1</a>
        <a href="#">在线客服2</a>
        <a href="#">在线客服3</a>
        <a href="#">在线客服4</a>
        <a href="#">在线客服5</a>
        <a href="#">在线客服6</a>
        <a href="#">在线客服7</a>
        <a href="#">在线客服8</a>
        <a href="#">在线客服9</a>
    </div>
    <div id="wy" class="wy">
        <a href="#">网页客服</a>
    </div>
    <div id="sj" class="sj">
        <a href="#">手机客服</a>
    </div>
    
</div>

</body>

</html>

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值