kefu=function(id,_top,_right){varme=id.charAt?document.getElementById(id):id,d1=document.body,d2=document.documentElement;me.style.top=_top?_top+'px':0;me.style.right=_ri...
kefu=function (id,_top,_right){
var me=id.charAt?document.getElementById(id):id, d1=document.body, d2=document.documentElement;
me.style.top=_top?_top+'px':0;
me.style.right=_right+"px";
me.style.position='absolute';
setInterval(function (){
me.style.top=parseInt(me.style.top)+(Math.max(d1.scrollTop,d2.scrollTop)+_top-parseInt(me.style.top))*0.1+'px';},10+parseInt(Math.random()*20));
return arguments.callee;
};
window.οnlοad=function (){
kefu('xixi',100,-129)
}
lastScrollY=0;
var InterTime = 1;
var maxWidth=-1;
var minWidth=-129;
var numInter = 8;
var BigInter ;
var SmallInter ;
var o = document.getElementById("xixi");
var i = parseInt(o.style.left);
function Big()
{
if(parseInt(o.style.right)
{
i = parseInt(o.style.right);
i += numInter;
o.style.right=i+"px";
if(i==maxWidth)
clearInterval(BigInter);
}
}
function toBig()
{
clearInterval(SmallInter);
clearInterval(BigInter);
BigInter = setInterval(Big,InterTime);
}
function Small()
{
if(parseInt(o.style.right)>minWidth)
{
i = parseInt(o.style.right);
i -= numInter;
o.style.right=i+"px";
if(i==minWidth)
clearInterval(SmallInter);
}
}
function toSmall()
{
clearInterval(SmallInter);
clearInterval(BigInter);
SmallInter = setInterval(Small,InterTime);
}
//==========html============//
//==========css============//
html{width:100%;border:1px soid #000; background:#666;}
#xixi .kf{float:right;width:129px;height:380px;background:#CCC;}
.Obtn {
MARGIN-TOP: 104px; WIDTH: 32px; BACKGROUND: url(../images/img3-5_1.png) no-repeat; FLOAT: left; HEIGHT: 139px; MARGIN-LEFT: -5px;border:1px solid red;
}
* HTML .Obtn {
FILTER: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../images/img3-5_1.png",sizingMethod='crop'); WIDTH: 32px; BACKGROUND: none transparent scroll repeat 0% 0%; FLOAT: left; HEIGHT: 139px
}
* + HTML .Obtn {
MARGIN-TOP: 104px; WIDTH: 32px; BACKGROUND: url(../images/img3-5_1.png) no-repeat; FLOAT: left; HEIGHT: 139px; MARGIN-LEFT: -5px
}
展开