腾讯QQ网页在线客服,随网页滚动条上下移动的效果一 时间:2020-05-12 人气:0 该特效需要用到相关的图片,比如那个效果的皮服,请各位自行将相关的图片下载到本地使用。 腾讯QQ网页在线客服,随网页滚动条上下移动的效果一 <script language=javascript> function picsize(obj,MaxWidth){ img=new Image(); img.src=obj.src; if (img.width>MaxWidth) { return MaxWidth; } else { return img.width; } } function CloseQQ() { divStayTopleft.style.display="none"; return true; } var online= new Array(); </script> 客户服务 <script>document.write("");</script> <script>document.write("");</script> <script type="text/javascript"> function FloatTop() { var startX1 =document.body.offsetWidth-125 ,startY1 = 5; var startX2 =0,startY2 = 95; var ns = (navigator.appName.indexOf("Netscape") != -1); var d = document; function ml(id,startX,startY) { 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.left=x;this.style.top=y;}; el.x = startX; el.y = startY; return el; } window.stayTopLeft=function() { var pY = ns ? pageYOffset : document.body.scrollTop; ftlObj.y += (pY + startY1 - ftlObj.y)/8; ftlObj1.y += (pY + startY2 - ftlObj1.y)/8; ftlObj.sP(document.body.scrollLeft+document.body.offsetWidth-125, ftlObj.y); ftlObj1.sP(ftlObj1.x, ftlObj1.y); setTimeout("stayTopLeft()", 30); } // ftlObj = ml("divStay",document.body.scrollLeft+document.body.offsetWidth-125,0); // ftlObj1 = ml("divStayTopLeft",0,30); ftlObj = ml("divStay",(document.body.scrollLeft+document.body.offsetWidth)/2+379,0); ftlObj1 = ml("divStayTopLeft",(document.body.scrollLeft+document.body.offsetWidth)/2+379,30); stayTopLeft(); } FloatTop(); </script> [Ctrl+A 全选 注:如需引入外部Js需刷新才能执行] 加载全部内容