国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > JavaScript > 正文

jQuery實現懸浮在右上角的網頁客服效果代碼

2019-11-20 11:25:08
字體:
來源:轉載
供稿:網友

本文實例講述了jQuery實現懸浮在右上角的網頁客服效果代碼。分享給大家供大家參考,具體如下:

這是款網頁在線客服代碼,應用了jquery插件,兼容性不錯。默認狀態下,客服只顯示一個圖片Button,用鼠標點擊時展開全部內容,可用作QQ客服,售后客服等,可以作為網站快速通道,方便用戶進行相應的操作。

運行效果截圖如下:

在線演示地址如下:

http://demo.VeVB.COm/js/2015/jquery-right-top-wen-online-demo/

具體代碼如下:

<!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=gb2312"><style type="text/css">.demo_menu{font-size: 14px;text-align: center;margin: 10px 0 0 0;color: #999;line-height: 180%;}.demo_menu b{color: #333;}.demo_menu a, .demo_menu a: visited{color: #F00;font-size: 14px;}.demo_menu a: hover{color: #090;font-size: 14px;}body{background: #ccc;}.text{font-size: 12px;}#kefu{position: fixed;_position: absolute;_top: expression(documentElement.scrollTop + 20 + "px");top: 20px;right: 0;z-index: 999}#kefu .box-content{position: relative;background-color: #fff;width: 170px;}#kefu .title-btn, #kefu .qq, #kefu .phone, #kefu .service, #kefu .on span{background: url(images/kefu.png) no-repeat}#kefu .title-btn{width: 33px;height: 97px;position: absolute;top: 0;left: -33px;}#kefu .title-btn span{display: none}#kefu .on span{background-position: -129px 7px;height: 16px;display: block;}#kefu .pad{padding: 16px 10px 10px;overflow: hidden;font-size: 12px;}#kefu .pad a{text-decoration: none;}#kefu .qq{background-position: 0 -118px;display: inline-block;zoom: 1;*display: inline;padding-left: 16px;}#kefu .phone{height: 28px;background-position: 0 -153px;margin: 18px 0}#kefu .service{display: inline-block;zoom: 1;*display: inline;height: 51px;background-position: 0 -203px;width: 151px;margin-left: 3px}#kefu .text{background-color: #ededed;padding: 5px 10px;text-align: center}#kefu .off{width: 0;}#kefu .off .pad, #kefu .off .text{display: none}p, p a{font-size: 12px;color: #666;}</style><title>始終固定在網頁右上角的在線客服QQ代碼</title><meta http-equiv="X-UA-Compatible" content="IE=7"><script src="jquery-1.6.2.min.js" type="text/javascript"></script></head><body><div id="kefu"> <div class="box-content off">  <div class="title-btn cu"><span><a href="#"></a></span></div>  <div class="pad"> <a  class="qq" style="margin-right:16px">售前咨詢</a><a  class="qq">廣告-合作</a>   <div class="phone"></div>   <a href="#" class="service" target="_blank"></a> </div>  <div class="text"> 客服時間:(9:00-18:00)<br>   (周六日休息) </div> </div></div><script type="text/javascript"> $(".select").hover( function () {  $(this).find(".msgNav").show(); }, function () {  $(this).find(".msgNav").hide(); });$(".title-btn").toggle( function () {  $(this).addClass("on");    $(this).parent(".box-content").removeClass("off"); }, function () {  $(this).removeClass("on");    $(this).parent(".box-content").addClass("off"); });</script></body></html>

希望本文所述對大家jQuery程序設計有所幫助。

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 民乐县| 来安县| 阿拉善右旗| 青神县| 琼结县| 慈利县| 清新县| 客服| 陇西县| 湄潭县| 米脂县| 长岭县| 花莲市| 宁武县| 芷江| 沂南县| 武义县| 岳普湖县| 舞阳县| 同德县| 上高县| 秦安县| 中牟县| 塔城市| 新蔡县| 分宜县| 南宁市| 灵台县| 庆城县| 红河县| 合川市| 东兰县| 天津市| 彭水| 河西区| 微山县| 福泉市| 武威市| 庆阳市| 楚雄市| 雅安市|