下面是一网站在线客服css样式
* {
padding: 0;
margin: 0;
border: none;
}
ul, ol, li {
list-style: none;
}
em, i {
font-style: normal;
}
a {
text-decoration: none;
color: #333;
}
img {
display: inline-block;
border: 0 none;
}
body {
color: #333;
font-family: 'Microsoft YaHei', Verdana, Arial, Helvetica, sans-serif;
line-height: 20px;
overflow-x: hidden;
width: 100%;
height:100%;
font-size: 14px;
}
.clear:after {
content: '\20';
display: block;
height: 0;
clear: both;
visibility: hidden;
}
/*固定的悬浮窗*/
.yb_conct {
position: fixed;
z-index: 9999999;
top: 200px;
right: -127px;
cursor: pointer;
transition: all .3s ease;
}
.yb_bar ul li {
width: 180px;
height: 53px;
font: 16px/53px 'Microsoft YaHei';
color: #fff;
text-indent: 54px;
margin-bottom: 3px;
border-radius: 3px;
transition: all .5s ease;
overflow: hidden;
}
.yb_bar .yb_top {
background: #24292F url(../images/fixCont.png) no-repeat 0 0;
}
.yb_bar .yb_phone {
background: #24292F url(../images/fixCont.png) no-repeat 0 -57px;
}
.yb_bar .yb_QQ {
text-indent: 0;
background: #24292F url(../images/fixCont.png) no-repeat 0 -113px;
}
.yb_bar .yb_ercode {
/*height:200px;*/
background: #24292F url(../images/fixCont.png) no-repeat 0 -169px;
}
.hd_qr {
padding: 0 29px 25px 29px;
}
.yb_QQ a {
display: block;
text-indent: 54px;
width: 100%;
height: 100%;
color: #fff;
}
这个是html前段显示效果,需要调用css样式,上面已经粘贴出来了。还有一个js文档。可以问我要。www.johotop.com
<!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>
<link href="onlinekf/css/zzsc.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="onlinekf/js/jquery-1.7.min.js"></script>
<script>
$(function() {
// 悬浮窗口
$(".yb_conct").hover(function() {
$(".yb_conct").css("right", "5px");
$(".yb_bar .yb_ercode").css('height', '200px');
}, function() {
$(".yb_conct").css("right", "-127px");
$(".yb_bar .yb_ercode").css('height', '53px');
});
// 返回顶部
$(".yb_top").click(function() {
$("html,body").animate({
'scrollTop': '0px'
}, 300)
});
});
</script>
</head>
<body>
<div class="yb_conct">
<div class="yb_bar">
<ul>
<li class="yb_top">返回顶部</li>
<li class="yb_phone">13771931106</li>
<li class="yb_QQ">
<a target="_blank" href="tencent://message/?uin=827383019&Site=qq&Menu=yes" title="即刻发送您的需求">24h在线咨询</a>
</li>
<li class="yb_ercode" style="height:53px;">淘宝担保交易 <br>
<img class="hd_qr" src="onlinekf/images/weixin.png" width="125" alt="淘宝担保交易"> </li>
</ul>
</div>
</div>
</body>
</html>