<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<style type="text/css"> 
.a{height:10000px; } 
img{position:fixed;left:0px;top:0px}
</style> 
<img src="images/logo.png" />
<div class="a"><div>

解决方案 »

  1.   


    <!DOCTYPE html>
    <html>
    <head>
    <script type="text/javascript" src="jquery-1.6.1.min.js"></script>
    <style type="text/css">
    .cudiv{
    overflow:auto;
    height:100px;
    width:200px;
    border:1px solid #000;
    }
    .div2{
    height:1000px;
    }
    </style>
    <script type="text/javascript">
    $(function(){ $('.cudiv').scroll(function(){
    var top = $(this).scrollTop();
    if(top == 0){
    //设置.
    }
    });
    });
    </script>
    </head>
    <body>
    <input id="txt" />
    <div class="cudiv">
    <div class="div2">

    </div> </div>
    </body>
    </html>