<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<title> Floating Bar </title>
<body leftmargin= "0" topmargin= "0" marginwidth= "0" marginheight= "0" >
<script>
var online= new Array ();
if (!document.layers)
document.write (' <div id= "Divstaytopleft" style= "Position:absolute" > ")
</script>
<layer id= "Divstaytopleft" >
<table border= "0" width= "cellspacing=" 0 "cellpadding=" 0 ">
<tr>
<TD width= "></td>
</tr>
<script src= "http://webpresence.qq.com/getonline?type=1&526793887:363607395:1576940:" ></script>
<tr>
<TD align= "center" Valign=middle background=yun_qi_img/kefu_middle.gif>
<a target=blank href=tencent://message/?uin=526793887&site=www.tenwe.com&menu=yes></a>
</td>
</tr>
<tr>
<TD align= "center" Valign=middle background=yun_qi_img/kefu_middle.gif>
<a target=blank href=tencent://message/?uin=363607395&site=www.tenwe.com&menu=yes></a>
</td>
</tr>
<tr>
<TD align= "center" Valign=middle background=yun_qi_img/kefu_middle.gif>
<a target=blank href=tencent://message/?uin=1576940&site=www.tenwe.com&menu=yes></a>
</td>
</tr>
<tr>
<TD width= "></td>
</tr>
</table>
</layer>
<p>
<script type= "text/web Effects" >
var verticalpos= "Frombottom"
if (!document.layers)
document.write (' </div> ')
function Jsfx_floattopdiv ()
{
The following Var startx =3 is the horizontal position, 350 is the vertical position, the default is displayed on the left side of the screen, to the right, to the right-hand side, the value of the modified 3 (var startx = 3 to var startx =screen.width-150) (this line does not have to be copied)
var startx =screen.width-150,
Starty = 350;
var ns = (navigator.appname.indexof ("Netscape")!=-1);
var d = document;
function ml (ID)
{
var El=d.getelementbyid?d.getelementbyid (ID):d. all?d.all[id]:d. Layers[id];
if (d.layers) El.style=el;
El.sp=function (x,y) {this.style.right=x;this.style.top=y;};
el.x = StartX;
if (verticalpos== "Fromtop")
El.y = Starty;
else{
EL.Y = ns? pageYOffset + innerheight:document.body.scrolltop + document.body.clientheight;
EL.Y-= Starty;
}
Return el;
}
Window.staytopleft=function ()
{
if (verticalpos== "Fromtop") {
var py = ns? Pageyoffset:document.body.scrolltop;
Ftlobj.y + = (py + starty-ftlobj.y)/8;
}
else{
var py = ns? pageYOffset + innerheight:document.body.scrolltop + document.body.clientheight;
Ftlobj.y + + = (PY-STARTY-FTLOBJ.Y)/8;
}
FTLOBJ.SP (ftlobj.x, FTLOBJ.Y);
SetTimeout ("Staytopleft ()", 10);
}
Ftlobj = ml ("Divstaytopleft");
Staytopleft ();
}
Jsfx_floattopdiv ();
</script>
</body>
Corporate website plus a floating QQ online customer service effect, because has not done before, so I think the first time is to find relevant code online. I thought this kind of thing on the net will have a lot of, can search result let me be very disappointed! Those found on the Internet are either downloaded or unavailable, or the browser is poorly compatible. Thankfully, however, I found a good example of availability and compatibility, but the code in that example was a bit messy, poorly readable and not worth collecting. I looked into the code inside.
<!doctype HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/ Xhtml1-transitional.dtd ">
<title> floating QQ Online customer service code, compatible with the major browsers---this code by the music bugs modified, welcome everyone to download! </title>
<style type= "Text/css Tutorial" >
* Floating QQ Online customer service * *
. qqbox{z-index:99 width:142px; right:0; top:180px; Position:absolute}
. qqbox. qlist{width:142px; margin:0 Auto}
. Qqbox. Qlist t{background:url (images/qqbox.gif) no-repeat left 0; height:4px; font-size:1px}
. Qqbox. Qlist b{background:url (images/qqbox.gif) no-repeat right 0; height:4px}
. qqbox. qlist con{margin:0 Auto; Background:url (images/qqbox.gif), repeat-y -144px 0; Text-align:center}
. qqbox. qlist con tit{font-size:12px; font-weight:bold; margin-bottom:5px; height:20px; line-height:20px; color:# 000000}
. qqbox. qlist. con ul{margin:0 auto; padding:0; width:133px; Background-color: #ffffff; border: #ffffff 1px solid}
. qqbox. qlist. con li{font-size:9pt; list-style-type:none; margin-top:5px; height:30px; padding-right:5px}
. qqbox. qlist. Con Li A{float:right}
. qqbox. qlist. con li span{float:left; line-height:25px; margin-left:10px; Display:inline; Vertical-align:middle}
* Floating QQ Online customer service * *
</style>
<body>
<form id= "Form1" runat= "Server" >
<div style= "height:800px" >
<div class= "Qqbox" id= "Divqqbox" style= "Display:none" >
<div class= "qlist" id= "Divonline" >
<div class= "T" ></div>
<div class= "Con" >
<div class= > Online customer service </div>
<ul>
<li>
<span> Mr. Zeng:</span>
<a href= "Http://wpa.qq.com/msgrd?v=1&uin=914669642&site=http://www.111cn.net&menu=no"; target= "_blank" >
</a>
</li>
<li>
<span> Miss Chen:</span>
<a href= "Http://wpa.qq.com/msgrd?v=1&uin=914669642&site=http://www.111cn.net&menu=no"; target= "_blank" >
</a>
</li>
</ul>
</div>
<div class= "B" ></div>
</div>
</div>
</div>
</form>
</body>
<script type= "Text/javascript" >
var tips tutorial;
var thetop = 180/* This is the default height, the larger the more down * *;
var old = thetop;
function Initfloattips () {
document.getElementById ("Divqqbox"). Style.display = "block";
Tips = document.getElementById ("Divqqbox");
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 ();
</script>