怎样使
做的层不随滚动条的移动而移动

太古盟约 2002-04-19 11:15:33
不用frameset解决,例如:我想使 www.csdn.net 中“首 页 | 综 合 | 技 术 | 论 坛 | 人 才 | 商 城 | 大本营 |《程序员》| 软 件”以上部分始终显示,不管下面内容有多少,自始至终我都能看到,而不滚动到上边去。
...全文
243 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
qiushuiwuhen 2002-04-19
  • 打赏
  • 举报
回复
http://www.blueidea.com/bbs/newsdetail.asp?id=418813

http://www.blueidea.com/bbs/newsdetail.asp?id=434955
night_elves 2002-04-19
  • 打赏
  • 举报
回复
用dreamwear4 的一个插件:Nirvana Floating Layer
(若找不到,可发邮件向我索要:night_elves@msn.com)
seabell 2002-04-19
  • 打赏
  • 举报
回复
<script language=JavaScript>
speed=200;
pageheight=0;
function KB_keepItInIE(theName,theWantTop,theWantLeft) {
theRealTop=parseInt(document.body.scrollTop)
theTrueTop=theWantTop+theRealTop
document.all[theName].style.top=theTrueTop
theRealLeft=parseInt(document.body.scrollLeft)
theTrueLeft=theWantLeft+theRealLeft
document.all[theName].style.left=theTrueLeft
}

setInterval('KB_keepItInIE("KBStatic",0,0)',1)

</script>
<body>
<SCRIPT>
for(i=100; i<140; i++){
document.write("◇◇"+i+"◇◇<br>")
}
</SCRIPT>
<div id="KBStatic" style="position:absolute; left:3px; top:0px; width:553px; height:70px; z-index:25">
********************************************************************************</div>
</body>
linhaibo 2002-04-19
  • 打赏
  • 举报
回复
好。。。
weidegong 2002-04-19
  • 打赏
  • 举报
回复
<div id="style1" style="background:green;position: absolute; left: 0; top: 0; width: 100%; height: 20px">
你看,你看,月亮偷偷地在改变
</div>
<script>
x0=parseInt(style1.style.left);
y0=parseInt(style1.style.top);


function window.onscroll(){
y=document.body.scrollTop;
x=document.body.scrollLeft;
style1.style.top=y0+y;
style1.style.left=x0+x;
}


</script>
<body magin=0 rightmagin=0>
<table style="width:100%;magin=0">
<tr style="20px"><td>
<tr><td>
<script>
for(i=100; i<140; i++){
document.write("◇◇"+i+"◇◇<br>")
}
</script>
</table>
</body>
8988 2002-04-19
  • 打赏
  • 举报
回复
忘了,还有这个要加上。
<body onscroll="doDiv()">
8988 2002-04-19
  • 打赏
  • 举报
回复
刚编的,你试试可以吗?
<div id="style1" style="position: absolute; left: 823; top: 456; width: 163; height: 57">
你看,我自岿然不动
</div>
<script>
x0=parseInt(style1.style.left);
y0=parseInt(style1.style.top);

function doDiv(){
y=document.body.scrollTop;
x=document.body.scrollLeft;
style1.style.top=y0+y;
style1.style.left=x0+x;
}
</script>
seabell 2002-04-19
  • 打赏
  • 举报
回复
也是一样啊
<script language=JavaScript>
function KB_keepItInIE(theName,theWantTop,theWantLeft) {
theRealTop=parseInt(document.body.scrollTop)
theTrueTop=theWantTop+theRealTop
document.all[theName].style.top=theTrueTop
theRealLeft=parseInt(document.body.scrollLeft)
theTrueLeft=theWantLeft+theRealLeft
document.all[theName].style.left=theTrueLeft
}
setInterval('KB_keepItInIE("KBStatic",0,0)',1)
</script>
<body>
<SCRIPT>
for(i=100; i<140; i++){
document.write("◇◇"+i+"◇◇<br>")
}
</SCRIPT>
<div id="KBStatic" style="background:green;position:absolute; left:3px; top:0px; width:553px; height:70px; z-index:25">
********************************************************************************
<input type=button>
<table><tr><td>content</td></tr></table>
</div>
</body>
太古盟约 2002-04-19
  • 打赏
  • 举报
回复
to :上边几位,如果div中有table和 button怎么做啊?

87,996

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧