日期:2014-05-16  浏览次数:20365 次

*︻$▅▆▇◤ 捉拿高手!一个网页框架问题滚动问题
http://user.qzone.qq.com/89687013

大家仔细看看右侧滚动条,顶到最上面,可是在拖动滚动条时,中间顶部的横条却一直固定不动?

这是如何办到的?

------解决方案--------------------
应该是用CSS办的!
------解决方案--------------------

<html>
<head>

</head>

<body onScroll = "testDiv() ">
<div id= "scrollDiv " style= "position:relative; "> <center> sdfsfsxcvxc </center> </div>
<br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br>
<br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br>
<br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br>

</body>
<script language= "javascript ">
function testDiv(){
with(document){
getElementById( "scrollDiv ").style.top = body.scrollTop;

}
}

</script>
</html>
------解决方案--------------------
楼主这把刀不错,我借用了.