jQuery的简易在线客服
2015-11-06 13:31
561 查看
**jQuery的简易在线客服**
代码如下:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>jQuery的简易在线客服</title> <script type="text/javascript" src="jquery-1.9.1.js"></script> <style type="text/css"> body{margin: 0;padding: 0;height:15000px;} .kefu{position:fixed; top: 250px; right: 0px; z-index: 9999; _position:absolute; height:152px;width:112px;background-size: 112px 152px; cursor:pointer;} .kefu_zk{ position:fixed; top: 250px; right: -30px;z-index: 9999; _position:absolute; cursor:pointer;} .kefu_close{ position:absolute; right:0; top:-10px; width:20px; height:20px; z-index:99999; cursor:pointer;} .kefu_close img{ width:100%; height:auto;} </style> </head> <body> <div class="kefu" title="在线客服"> <a href=""> <img src="kefu.png" alt="客服头像" /> </a> <div class="kefu_close"><img src="kefu_close.png" alt="关闭" /></div> </div> <div class="kefu_zk"><img src="kefu_zk.png" alt="展开" /></div> <script> $(function(){ $('.kefu_close').click(function(){ $('.kefu').animate({right:'-112px'},function(){ $('.kefu_zk').animate({right:'0px'}); }); }); $('.kefu_zk').click(function(){ $('.kefu_zk').animate({right:'-30px'},function(){ $('.kefu').animate({right:'0px'}); }); }); }); </script> </body> </html>
效果图:
展开状态
收起状态
源码下载地址:http://pan.baidu.com/s/1eQfQPfs
相关文章推荐
- js、jquery常用
- jQuery:插件开发步骤
- jQuery:插件开发小例
- jQuery插件实现静态HTML验证码校验
- jQuery Real Person验证码插件防止表单自动提交
- jQuery统计数字不停的滚动最后停止
- jquery 中 live() 对于js的需求版本导致不可用解决办法
- jQuery实现非常实用漂亮的select下拉菜单选择效果
- jQuery:12 个非常实用的 jQuery 代码片段
- jQuery跳跃性的无缝滚动
- jQuery实现可关闭固定于底(顶)部的工具条菜单效果
- 用jQuery插件jVectorMap制作中国省份区域图
- jQuery 小技巧
- Jquery中的$().each() 方法
- [Jquery] js验证手机号
- 35个jquery小技巧
- Jquery知识点
- jQuery.qrcode.js客户端生成二维码,支持中文并且可以生成LOGO
- highcharts图表生成插件学习心得
- jQuery实现可关闭固定于底(顶)部的工具条菜单效果