<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="https://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jQuery橘红色右侧在线客服代码 </title>
<link href="https://3721wang.com/view/jiaoben3506/css/zzsc.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="https://3721wang.com/view/jiaoben3506/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">4008-123-456</li>
<li class="yb_QQ">
<a target="_blank" href="https://sc.chinaz.com" title="即刻发送您的需求">在线咨询</a>
</li>
<li class="yb_ercode" style="height:53px;">微信二维码 <br>
<img class="hd_qr" src="https://3721wang.com/view/jiaoben3506/images/weixin.jpg" width="125" alt="关注你附近"> </li>
</ul>
</div>
</div>
<div style="text-align:center;margin:50px 0; font:normal 14px/24px 'MicroSoft YaHei';">
<p>适用浏览器:IE8、360、FireFox、Chrome、Safari、Opera、傲游、搜狗、世界之窗.</p>
</div>
</body>
</html>
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:2000px; 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: #ff4a00 url(../images/fixCont.png) no-repeat 0 0; } .yb_bar .yb_phone { background: #ff4a00 url(../images/fixCont.png) no-repeat 0 -57px; } .yb_bar .yb_QQ { text-indent: 0; background: #ff4a00 url(../images/fixCont.png) no-repeat 0 -113px; } .yb_bar .yb_ercode { background: #ff4a00 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; }