<div id="ad" style="position: absolute; left: 450px; top: 1260px;">
        <img src="http://www.daxiwed.com/Image/gud.jpg" border="0" usemap="#Map" alt="" />
        <map name="Map" id="Map">
            <area shape="rect" coords="157,295,244,321" href="#" onclick="javascript:window.hide()"
                alt="" />
            <area shape="rect" coords="318,295,400,321" href="#"
                alt="" target="_blank" />
            <area shape="rect" coords="497,18,524,32" href="#" onclick="javascript:window.hide()"
                alt="" />
        </map>
    </div>
    <script language="javascript" type="text/javascript">
        //关闭
        function hide() {
            showad = false;
            document.getElementById("ad").style.display = "none";
        }
    </script>

解决方案 »

  1.   

    如果不考虑IE6可以用 position:fixed;
    但IE6不支持这样式,所以就只能用js
      

  2.   

    position:fixed  这个加到哪里啊
      

  3.   


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <HTML>
     <HEAD>
      <TITLE> New Document </TITLE>
      <style type="text/css">
    .scroll{ position:fixed;top:150px;left:150px;}
    p{ height:10000px;}
      </style>
     </HEAD>
     <BODY >
    <div class="scroll">我会跟随滚动</div>
    <p></P>
     </BODY>
    </HTML>