悬浮框样式设置为:position:fixed;

解决方案 »

  1.   

    改为fixed ,连悬浮框都看不到了!
      

  2.   

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <htmL>
    <head>
    <title>行政处罚法</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <link href="css.css" rel="stylesheet" type="text/css"><style type="text/css">body{ margin:0px; padding:0px; } </style>
    <script type="text/javascript">
    function movetop()
    {n = 400; 
    for (I=n; I>=1; I--){window.scrollBy(0,-1);  }
    }
    function movedown()
    {n = 400; for (I=n; I>=1; I--)
    {window.scrollBy(0,+1);
    }
    }</script>
    <body>
    <div style="height:2000px"></div>
    <div id="chatDiv" style="position:fixed; right:10px; bottom:20px; width:60px; height:240px; overflow:hidden;  border:0px groove #281; "><img src="home1.png" width="50px" height="50px" onclick="javascript:window.location='main.html'"><br><img src="up.jpg" width="50px" alt="up" height="50px" onclick="javascript:movetop()"><br><img src="down.jpg" width="50px" height="50px" onclick="javascript:movedown()" alt="down"></div>
    </body></html>
    fixed就行了,要加xhtml申明,要不ie8-不支持fixed