解决方案 »

  1.   

    在span里面有个position属性 你把它的值设置为fix 就可以了
      

  2.   

    <style type="text/css">
    .wai{ height:auto; width:210px; border:1px solid #567AB4; position:absolute}
    .title{ height:21px !important;height:26px; background-image:url(http://album.hi.csdn.net/app_uploads/wtcsy/20081210/111406221.t.gif); width:205px !important;width:210px; font-size:12px; color: #FFFFFF; font-weight:bold;padding:5px 0 0 5px}
    .content{ height:210px; width:100%;}
    .img{ float:right; margin-right:7px;}
    </style>
    <body>
    <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><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
    <div id="all" class="wai"><div id="title" class="title">
    <span style=" float:left; margin-left:5px">内容信息</span> <img class="img" onClick="display()" src="http://album.hi.csdn.net/app_uploads/wtcsy/20081210/111341002.t.gif"><img class="img" id="ss" onClick="show(this)" src="http://album.hi.csdn.net/app_uploads/wtcsy/20081210/111306658.t.gif">
    </div><div id="content" class="content"></div>
    </div>
    </body>
    <script>
    var i=0
    var Opacity=(document.all)?100:1
    var div = document.getElementById("all")
    var top = document.body.clientHeight-div.offsetHeight
    function change()
    {  
       div.style.left=document.body.clientWidth-div.offsetWidth+"px"
       div.style.top =document.body.clientHeight-div.offsetHeight+document.body.scrollTop+"px"
       top = document.body.clientHeight-div.offsetHeight
    }
    change()
    window.onresize=change
    window.onscroll=function(){top=document.body.clientHeight-div.offsetHeight;div.style.top=top+document.body.scrollTop+"px"}
    function show(obj){
    var timer
    var img = obj
    if(obj.xx==null){obj.xx=true}
    if(obj.xx==true)
    {
      if(i>=document.getElementById("content").offsetHeight)
       {
         clearTimeout(timer)
      obj.xx=false
      document.getElementById('content').style.display = "none"
         document.getElementById('ss').src="http://album.hi.csdn.net/app_uploads/wtcsy/20081210/111117096.t.gif"
       }
      else
       {
          div.style.top=parseInt(div.style.top)+10
          i=i+10
          timer = setTimeout("show(document.getElementById('ss'))",10)
       }
    }
    else
    {
      if(i<=0)
       {
          clearTimeout(timer)
       obj.xx=true
       document.getElementById('ss').src="http://album.hi.csdn.net/app_uploads/wtcsy/20081210/111306658.t.gif"
       }
      else
       {  
          document.getElementById('content').style.display = "block"
          div.style.top=parseInt(div.style.top)-10
          i=i-10
          timer = setTimeout("show('"+obj+"')",10)
       }
    }
    }function display(){
    if(Opacity>0)
    {
      if(document.all)
      {  
     div.style.filter="Alpha(Opacity="+Opacity+")" 
        Opacity=Opacity-10
      }
      else
      {
        div.style.opacity=Opacity
     Opacity=Opacity-0.1
      }
      timer = setTimeout("display()",20)
    }
    else
    {document.body.removeChild(document.getElementById("all"))}
    }
    </script>
      

  3.   

    不需要用脚本,用css就可以搞定了。
    width: 86px;
    height: 270px;
    position: fixed;
    z-index: 2008;
    top: 110px;
    ......自己设置个背景,看看效果
      

  4.   

    滚动多少就把DIV的TOP相应的改一下 应该就可以了吧