css设置div 层如何实现随着滚动条移动而移动

2024-12-22 23:01:46
推荐回答(2个)
回答1:



测试表格内的滚动条










表格内的滚动条:
style="position:absolute;height:200;width:200;overflow:auto;background:#EEEEEE;">

pppppppppppppppppppppppppppppppppppppppppppppppppp


pppppppppppppppppppppppppppppppppppppppppppppppppp


ppppppppppppppppppppppppp


ppppppppppppppppppppppppp


ppppppppppppppppppppppppp


ppppppppppppppppppppppppp


ppppppppppppppppppppppppp


ppppppppppppppppppppppppp


ppppppppppppppppppppppppp


ppppppppppppppppppppppppp


ppppppppppppppppppppppppp


ppppppppppppppppppppppppp




onmouseout=clearInterval(scrollb)>向左
onmouseout=clearInterval(scrollb)>向上
onmouseout=clearInterval(scrollb)>向右
onmouseout=clearInterval(scrollb)>向下


回答2:

position:fixed 用这个可以,但是ie6不支持,你搜一下解决方法就可以了