<style type="text/css">
#floatTips{
font-weight:bold;
position:absolute;
right:20px;/*调节浮动左右*/
width:130px;
z-index:99;
padding-top:30px;
}
#qq_top{width:150px; height:25px; line-height:25px; background:#00a842; text-align:center; color:#fff; font-size:12px;}
#qq_center{width:130px;}
#qq_bottom{width:130px; text-align:left; line-height:25px; font-size:12px;}
#qq_bottom a{text-decoration: none; color: #484848;}
#qq_bottom a:hover{text-decoration: none; color: #ff6600;}
</style>
<div id="floatTips">
<div id="qq_top">微信二维码</div>
<div id="qq_center"><img src="http://www.qunxingqingjie.com/template/pc/cn2016/images/wechat.jpg" alt="" width="150" height="150" /></div>
<div id="qq_bottom"><a href="javascript:void(0)" onclick="removeqq();">关闭</a></div>
</div>
<script type="text/javascript">
//<![CDATA[
var tips; var theTop = 200/*这是默认高度,越大越往下*/; var old = theTop;
function initFloatTips() {
tips = document.getElementById('floatTips');
moveTips();
};
function moveTips() {
var tt=50;
if (window.innerHeight) {
pos = window.pageYOffset
}
else if (document.documentElement && document.documentElement.scrollTop) {
pos = document.documentElement.scrollTop
}
else if (document.body) {
pos = document.body.scrollTop;
}
pos=pos-tips.offsetTop+theTop;
pos=tips.offsetTop+pos/10;
if (pos < theTop) pos = theTop;
if (pos != old) {
tips.style.top = pos+"px";
tt=10;
}
old = pos;
setTimeout(moveTips,tt);
}
initFloatTips();
function removeqq(){
document.getElementById('floatTips').style.display='none';
}
//!]]>
</script>
在帮客户建立的