悬停效果 不随滚动条滚动

<style>  
.aa
{height:2000px;width:40px;background:#eee;}   
.bb
{width:50px;height:80px;background:red;float:right;   
    position
:fixed !important; top:20px;   
    position
:absolute; z-index:100; top:expression(offsetParent.scrollTop+20);right:20px;   
 
}

</style>  
  
<div class="aa">  
    我是不动的。   
    
<script>for(var i=0;i<99;i++){document.write(i+"<br>");}</script>  
  
    
<div class="bb">move</div>  
  
</div>

posted @ 2009-03-24 13:18  朝夕  阅读(331)  评论(0编辑  收藏  举报