我用div做了一个浮动,但是我想让它随滚动条和移动而移动,怎么做啊? .fixed{height:auto!important;z-index:2;+position:absolute;} 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>阿里西西网页特效代码演示中心-QQ在线客服代码演示</title></head><body><DIV id=divStay style="POSITION: absolute"><TABLE cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD vAlign=top width="7%"> </TD></TR></TBODY></TABLE></DIV><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><div id="divStayTopleft" style="POSITION: absolute"> <table cellspacing="0" cellpadding="0" width="109" border="0"> <tr> <td colspan="3"> <a onclick="CloseQQ()" href="javascript:;" shape="circle" coords="91,16,12"> <img height="34" src="http://js.alixixi.com/texiaotu/qq_top.gif" width="109" usemap="#Map" border="0"></a></td> </tr> <tr> <td width="6"><img height="100" src="http://js.alixixi.com/texiaotu/qq_life.gif" width="6"></td> <td valign="top" width="96" background="sto/qq_bg.gif"> <table cellspacing="0" cellpadding="0" width="90" align="center" border="0"> <tr> <td height="30"> <table cellspacing="0" cellpadding="0" width="90" border="0"> <tr> <td> <img height="13" src="http://js.alixixi.com/texiaotu/qq_ico1.gif" width="16"><span class="font_12"> <span style="font-size: 9pt">客户服务</span></span></td> </tr> </table> </td> </tr> <tr> <td> <table border="0" width="100%" cellpadding="2" id="table47"> <tr> <td width="15" valign="top" height="23"> <img border="0" src="http://js.alixixi.com/texiaotu/qq_v01.gif" width="16" height="16"></td> <td valign="bottom"><script>document.write("<a target=blank href=tencent://message/?uin=178010108&Site=阿里西西&Menu=yes><img border=0 SRC=http://wpa.qq.com/pa?p=1:615050000:10 alt=[阿里西西]></a>");</script></td> </tr> </table> </td> </tr> <tr> <td></td> </tr> <tr> <td> <table border="0" width="100%" cellpadding="2" id="table47"> <tr> <td width="15" valign="top" height="23"> <img border="0" src="http://js.alixixi.com/texiaotu/qq_n01.gif" width="16" height="16"></td> <td valign="bottom"><script>document.write("<a target=blank href=tencent://message/?uin=251922268&Site=网页特效&Menu=yes><img border=0 SRC=http://wpa.qq.com/pa?p=1:43486831:10 alt=[QQQQQ]></a>");</script></td> </tr> </table> </td> </tr> <tr> <td></td> </tr> </table> </td> <td width="7"><img height="100" src="http://js.alixixi.com/texiaotu/qq_right.gif" width="7"></td> </tr> <tr> <td colspan="3"> <img height="30" src="http://js.alixixi.com/texiaotu/qq_bottom1.gif" width="109"></td> </tr> <tr> <td colspan="3"> <img height="33" src="http://js.alixixi.com/texiaotu/qq_logo.gif" width="109"></td> </tr> </table></div><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><!--End: QQ在线客服 --></body></html>看一下是否符合楼主要求 ie限制javascript特效?? innerHTML 和 createElement的冲突 xp中加载js文件 关于事件执行的问题 js 输入框边框变色问题 在线等答案,关于javascript中如何传递带多个参数的 onclick 指定函数 输入框的金额问题(100分) 遇到一个很难的打印问题,高手请帮忙 CSDN爬虫的问题 关于import的问题 如何算出某个月的星期几是哪几天? 关于js设置超链接可用性的问题!
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>阿里西西网页特效代码演示中心-QQ在线客服代码演示</title></head>
<body>
<DIV id=divStay style="POSITION: absolute">
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD vAlign=top width="7%"> </TD></TR></TBODY></TABLE></DIV>
<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>
<div id="divStayTopleft" style="POSITION: absolute">
<table cellspacing="0" cellpadding="0" width="109" border="0">
<tr>
<td colspan="3">
<a onclick="CloseQQ()" href="javascript:;" shape="circle" coords="91,16,12">
<img height="34" src="http://js.alixixi.com/texiaotu/qq_top.gif" width="109" usemap="#Map" border="0"></a></td>
</tr>
<tr>
<td width="6"><img height="100" src="http://js.alixixi.com/texiaotu/qq_life.gif" width="6"></td>
<td valign="top" width="96" background="sto/qq_bg.gif">
<table cellspacing="0" cellpadding="0" width="90" align="center" border="0">
<tr>
<td height="30">
<table cellspacing="0" cellpadding="0" width="90" border="0">
<tr>
<td>
<img height="13" src="http://js.alixixi.com/texiaotu/qq_ico1.gif" width="16"><span class="font_12">
<span style="font-size: 9pt">客户服务</span></span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table border="0" width="100%" cellpadding="2" id="table47">
<tr>
<td width="15" valign="top" height="23">
<img border="0" src="http://js.alixixi.com/texiaotu/qq_v01.gif" width="16" height="16"></td>
<td valign="bottom"><script>document.write("<a target=blank href=tencent://message/?uin=178010108&Site=阿里西西&Menu=yes><img border=0 SRC=http://wpa.qq.com/pa?p=1:615050000:10 alt=[阿里西西]></a>");</script></td>
</tr>
</table>
</td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td>
<table border="0" width="100%" cellpadding="2" id="table47">
<tr>
<td width="15" valign="top" height="23">
<img border="0" src="http://js.alixixi.com/texiaotu/qq_n01.gif" width="16" height="16"></td>
<td valign="bottom"><script>document.write("<a target=blank href=tencent://message/?uin=251922268&Site=网页特效&Menu=yes><img border=0 SRC=http://wpa.qq.com/pa?p=1:43486831:10 alt=[QQQQQ]></a>");</script></td>
</tr>
</table>
</td>
</tr>
<tr>
<td></td>
</tr>
</table>
</td>
<td width="7"><img height="100" src="http://js.alixixi.com/texiaotu/qq_right.gif" width="7"></td>
</tr>
<tr>
<td colspan="3">
<img height="30" src="http://js.alixixi.com/texiaotu/qq_bottom1.gif" width="109"></td>
</tr>
<tr>
<td colspan="3">
<img height="33" src="http://js.alixixi.com/texiaotu/qq_logo.gif" width="109"></td>
</tr>
</table>
</div>
<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>
<!--End: QQ在线客服 -->
</body>
</html>看一下是否符合楼主要求