css + JavaScript + html to create a very simple looking site online customer service code can mouse across the pop-up window

Here is a live chat css styles

* {
	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;
}

This is the html preceding display, you need to call css style, it has been pasted out above. There is also a js file. I can ask for. 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>

@Ma
Released five original articles · won praise 2 · Views 584

Guess you like

Origin blog.csdn.net/youeyeb/article/details/104683634