我添加了浮动窗但要怎么固定住他的位置,无论滚动条滚到什么位置他都显示着

解决方案 »

  1.   


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>zell419</title><style type="text/css">#right{position:fixed;_position:absolute;right:0px;_right:0px;_margin-top:expression(this.style.pixelHeight+document.documentElement.scrollTop)}</style>
    </head>
    <body style="height:5000px;">
    <div id="right">
    ^_^
    </div>
    </body></html>
      

  2.   


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>zell419</title><style type="text/css">#right{position:fixed;_position:absolute;right:0px;_right:0px;_margin-top:expression(this.style.pixelHeight+document.documentElement.scrollTop)}</style>
    </head>
    <body style="height:5000px;">
    <div id="right">
    ^_^
    </div>
    </body></html>
      

  3.   

    position:fixed
    主要是这个属性