search
HomeWeb Front-endJS TutorialThe tab style online customer service effect code in the lower right corner of the webpage implemented by jQuery_jquery

The example in this article describes the tab-style online customer service effect code in the lower right corner of the web page implemented by jQuery. Share it with everyone for your reference, the details are as follows:

This is a tab-style online customer service code in the lower right corner of the web page. If you use Firefox or Chrome browsers, the customer service will have a border shadow. There seems to be no border effect under IE8. Overall, it is not as good as in Chrome, Firefox, and Opera browsers. Down. The bottom of this online customer service code uses a TAB tab style, and the customer service content can be switched by clicking the mouse, which is quite novel.

The screenshot of the running effect is as follows:

The online demo address is as follows:

http://demo.jb51.net/js/2015/jquery-right-buttom-tab-style-online-demo/

The specific code is as follows:

<!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>
<title>网页右下角tab样式的在线客服代码</title>
<style>
.contact-bar{position: fixed;bottom: 0;right: 0;width: 400px;overflow: hidden;z-index: 9999}
.contact-bar .cb-btn{float: left;position: relative;height: 38px;font-size: 12px;line-height: 40px;text-transform: uppercase;border: 1px solid #000;border-left: none;color: #FFF;background-color: #292929;background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(41,41,41)), to(rgb(0,0,0)));background-image: -webkit-linear-gradient(top, rgb(41,41,41), rgb(0,0,0));background-image: -moz-linear-gradient(top, rgb(41,41,41), rgb(0,0,0));background-image: -o-linear-gradient(top, rgb(41,41,41), rgb(0,0,0));background-image: -ms-linear-gradient(top, rgb(41,41,41), rgb(0,0,0));background-image: linear-gradient(top, rgb(41,41,41), rgb(0,0,0));filter: progid: DXImageTransform.Microsoft.gradient(GradientType=0, StartColorStr='#292929', EndColorStr='#000000');-moz-box-shadow: inset 1px 0 0 #343534, inset 0 1px 0 #343534;-webkit-box-shadow: inset 1px 0 0 #343534, inset 0 1px 0 #343534;box-shadow: inset 1px 0 0 #343534, inset 0 1px 0 #343534}
.contact-bar .cb-btn: hover, .contact-bar .cb-btn-hover{background-color: #4e4e4e;background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(78,78,78)), to(rgb(39,39,39)));background-image: -webkit-linear-gradient(top, rgb(78,78,78), rgb(39,39,39));background-image: -moz-linear-gradient(top, rgb(78,78,78), rgb(39,39,39));background-image: -o-linear-gradient(top, rgb(78,78,78), rgb(39,39,39));background-image: -ms-linear-gradient(top, rgb(78,78,78), rgb(39,39,39));background-image: linear-gradient(top, rgb(78,78,78), rgb(39,39,39));filter: progid: DXImageTransform.Microsoft.gradient(GradientType=0, StartColorStr='#4e4e4e', EndColorStr='#272727');-moz-box-shadow: inset 1px 0 0 #5a5b5a, inset 0 1px 0 #5a5b5a;-webkit-box-shadow: inset 1px 0 0 #5a5b5a, inset 0 1px 0 #5a5b5a;box-shadow: inset 1px 0 0 #5a5b5a, inset 0 1px 0 #5a5b5a;cursor: pointer}
.contact-bar .cb-btn-selected, .contact-bar .cb-btn-selected: hover, .contact-bar .cb-btn-selected.cb-btn-hover{background-image: none;background-color: #232423;-moz-box-shadow: inset 0 5px 20px black;-webkit-box-shadow: inset 0 5px 20px black;box-shadow: inset 0 5px 20px black}
.contact-bar .cb-btn.cb-chat, .contact-bar .cb-btn.cb-phone{width: 178px}
.contact-bar .cb-btn.cb-chat{border-left: 1px solid #000}
.contact-bar .cb-btn-selected.cb-chat{-webkit-border-radius: 0;-moz-border-radius: 0;border-radius: 0}
.contact-bar .cb-chat .cb-btn-text{background: url(images/cb-icon-livechat.png) no-repeat 12px 14px}
.contact-bar .cb-phone .cb-btn-text{background: url(images/cb-icon-phone.png) no-repeat 14px 11px}
.contact-bar .cb-btn-text{float: left;height: 38px;padding-left: 40px;font-weight: bold}
.contact-bar .cb-kb, .cb-twitter, .cb-facebook{width: 40px;text-indent: -3000em}
.contact-bar .cb-kb span, .contact-bar .cb-twitter span, .contact-bar .cb-facebook span{float: left;width: 100%}
.contact-bar .cb-kb span{background: url(images/cb-icon-kb.png) no-repeat center center}
.contact-bar .cb-twitter span{background: url(images/cb-icon-twitter.png) no-repeat center center}
.contact-bar .cb-facebook span{background: url(images/cb-icon-facebook.png) no-repeat center center}
.cb-status{position: absolute;right: 0;width: 10px;height: 10px;margin: 15px 10px 16px 0}
.cb-online{background: url(images/cb-status-online.png) no-repeat center center}
.cb-offline{background: url(images/cb-status-offline.png) no-repeat center center}
.cb-popup{z-index: 9998;position: fixed;bottom: 0;right: 0;width: 400px;padding-bottom: 40px;background-color: #FFF;-webkit-border-top-left-radius: 5px;-moz-border-radius-topleft: 5px;border-top-left-radius: 5px;-moz-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.36);-webkit-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.36);box-shadow: 0 1px 10px rgba(0, 0, 0, 0.36)}
.cb-popup-toolbar{width: 380px;line-height: 10px;padding: 5px 10px}
.cb-popup-close{padding: 5px;font-size: 18px;font-weight: bold;position: absolute;right: 0;top: 0}
.cb-popup-close: hover{cursor: pointer}
.cb-popup-inner{padding: 50px 0;width: 400px;text-align: center}
.cb-popup.chat-invitation{background-color: transparent;height: 168px}
.cb-popup.call-us{height: 168px}
.cb-popup.chat-invitation .cb-popup-close{color: #FFF;text-shadow: 0 1px 1px rgba(0, 0, 0, 0.9);z-index: 99999}
.cb-popup #eye-catcher{float: left;margin-top: -10px}
.cb-popup #eye-catcher a{background: url(images/livechat.png) no-repeat;height: 170px;width: 400px;display: block;text-indent: -999em}
.cb-popup p{color: #999}
.cb-popup .cb-btn{text-align: center;border: 1px solid #043b8f;color: #FFF;line-height: 20px;font-weight: bold;text-decoration: none;background-color: #49bae3;background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(73,186,227)), to(rgb(42,73,180)));background-image: -webkit-linear-gradient(top, rgb(73,186,227), rgb(42,73,180));background-image: -moz-linear-gradient(top, rgb(73,186,227), rgb(42,73,180));background-image: -o-linear-gradient(top, rgb(73,186,227), rgb(42,73,180));background-image: -ms-linear-gradient(top, rgb(73,186,227), rgb(42,73,180));background-image: linear-gradient(top, rgb(73,186,227), rgb(42,73,180));filter: progid: DXImageTransform.Microsoft.gradient(GradientType=0, StartColorStr='#49bae3', EndColorStr='#2a49b4');-webkit-border-radius: 3px;-moz-border-radius: 3px;border-radius: 3px;-moz-box-shadow: inset 0 1px 2px #25daee;-webkit-box-shadow: inset 0 1px 2px #25daee;box-shadow: inset 0 1px 2px #25daee;text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5)}
.cb-btn.cb-btn-first{margin-left: 0}
.cb-btn.cb-btn-last{margin-right: 0}
.cb-form .cb-btn{width: 100%}
.cb-popup .contact-phone{font-size: 30px;font-weight: bold;line-height: 1;margin-bottom: .25em}
</style>
<script type="text/javascript" src="jquery-1.6.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {  
  $(".cb-popup-close").click(function() {
    $(".cb-popup").hide();
  });
  $(".cb-chat").click(function() {
    $(".call-us").hide();
    $(".chat-invitation").toggle();
  });
  $(".cb-phone").click(function() {
    $(".chat-invitation").hide();
    $(".call-us").toggle();
  });
});
</script>
</head>
<body style="height:1200px;">
<div class="contact-bar">
 <div class="cb-btn cb-phone"> <span class="cb-btn-text">123456</span> <span class="cb-status cb-online"> </span> </div>
 <div class="cb-btn cb-chat"> <span class="cb-btn-text">在线客服</span> <span class="cb-status cb-online"> </span> </div>
 <div class="cb-btn cb-kb"> <a href="#" target="_blank" title="脚本之家"><span class="cb-btn-img">脚本之家</span></a> </div>
</div>
<div class="call-us cb-popup">
 <div class="cb-popup-toolbar"> <span class="cb-popup-close">×</span> </div>
 <div class="cb-popup-inner">
  <div class="popup-contactInfo">
   <div class="contact-phone">123456789</div>
  </div>
  <p>The tab style online customer service effect code in the lower right corner of the webpage implemented by jQuery_jquery<a target="_blank" href="http://wp.qq.com/wpa/qunwpa&#63;idkey=47d9817e9e09f61b288b8ad6d33fb18cbd659ca244515000d6e5d3a2981a12"><img src="/static/imghwm/default1.png"  data-src="http://pub.idqqimg.com/wpa/images/group.png?x-oss-process=image/resize,p_40"  class="lazy"  border="0" alt="The tab style online customer service effect code in the lower right corner of the webpage implemented by jQuery_jquery" title="The tab style online customer service effect code in the lower right corner of the webpage implemented by jQuery_jquery"></a> </p>
 </div>
</div>
<div class="chat-invitation cb-popup" style="display: none;" >
 <div class="cb-popup-toolbar"> <span class="cb-popup-close">×</span> </div>
 <div id="eye-catcher"> <a href="#" onClick="javascript:window.open('http://wp.qq.com/wpa/qunwpa&#63;idkey=4bf27be4ad1c0d244515000be05d9c0efbb2c52ae1feb7247a40950720', '_blank', 'height=405, width=506,toolbar=no,scrollbars=no,menubar=no,status=no');; return false;" title="点击与在线客服交谈">在线客服</a> </div>
</div>
</body>
</html>

I hope this article will be helpful to everyone in jQuery programming.

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
jquery实现多少秒后隐藏图片jquery实现多少秒后隐藏图片Apr 20, 2022 pm 05:33 PM

实现方法:1、用“$("img").delay(毫秒数).fadeOut()”语句,delay()设置延迟秒数;2、用“setTimeout(function(){ $("img").hide(); },毫秒值);”语句,通过定时器来延迟。

axios与jquery的区别是什么axios与jquery的区别是什么Apr 20, 2022 pm 06:18 PM

区别:1、axios是一个异步请求框架,用于封装底层的XMLHttpRequest,而jquery是一个JavaScript库,只是顺便封装了dom操作;2、axios是基于承诺对象的,可以用承诺对象中的方法,而jquery不基于承诺对象。

jquery怎么修改min-height样式jquery怎么修改min-height样式Apr 20, 2022 pm 12:19 PM

修改方法:1、用css()设置新样式,语法“$(元素).css("min-height","新值")”;2、用attr(),通过设置style属性来添加新样式,语法“$(元素).attr("style","min-height:新值")”。

jquery怎么在body中增加元素jquery怎么在body中增加元素Apr 22, 2022 am 11:13 AM

增加元素的方法:1、用append(),语法“$("body").append(新元素)”,可向body内部的末尾处增加元素;2、用prepend(),语法“$("body").prepend(新元素)”,可向body内部的开始处增加元素。

jquery中apply()方法怎么用jquery中apply()方法怎么用Apr 24, 2022 pm 05:35 PM

在jquery中,apply()方法用于改变this指向,使用另一个对象替换当前对象,是应用某一对象的一个方法,语法为“apply(thisobj,[argarray])”;参数argarray表示的是以数组的形式进行传递。

jquery怎么删除div内所有子元素jquery怎么删除div内所有子元素Apr 21, 2022 pm 07:08 PM

删除方法:1、用empty(),语法“$("div").empty();”,可删除所有子节点和内容;2、用children()和remove(),语法“$("div").children().remove();”,只删除子元素,不删除内容。

jquery on()有几个参数jquery on()有几个参数Apr 21, 2022 am 11:29 AM

on()方法有4个参数:1、第一个参数不可省略,规定要从被选元素添加的一个或多个事件或命名空间;2、第二个参数可省略,规定元素的事件处理程序;3、第三个参数可省略,规定传递到函数的额外数据;4、第四个参数可省略,规定当事件发生时运行的函数。

jquery怎么去掉只读属性jquery怎么去掉只读属性Apr 20, 2022 pm 07:55 PM

去掉方法:1、用“$(selector).removeAttr("readonly")”语句删除readonly属性;2、用“$(selector).attr("readonly",false)”将readonly属性的值设置为false。

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

Hot Tools

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools