我在IE6中用JS实现广告的固定定位,应该IE6不支持position:fixed;<script language="javascript">function move()
{
var fixdiv=document.getElementById("fixed");
fixdiv.style.pixelTop=document.documentElement.scrollTop+52;
fixdiv.style.pixelLeft=document.documentElement.scrollLeft+30;
}
window.onscroll=move;
</script>但是在拖动滚动条的时候,广告层会抖动,这也太难看一点,有什么办法可以去除这个抖动呢

解决方案 »

  1.   

    http://bbs.blueidea.com/thread-2930592-1-1.html
      

  2.   

    这是网上的一个css hack技术。可以解决这个问题
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
        <style type="text/css">
            body {margin: 0; padding:0}   
            p{ height:50px}   
            html {_overflow: hidden}
            body {_overflow: auto; _height: 100%}   
            #email {padding: 10px; background: #000; left: 0px;  color: #fff;  position: fixed; top:0; _position: absolute}   
        </style>
    </head>
    <body>
        <div >
            <textarea id='email' name='email' rows='1' cols="20" style=' width: 192px; height:100px;border:1px solid red; overflow: hidden' ></textarea>
            <div id='matchWindow' style=" margin-bottom:1000px">
                匹配框
            </div>
            <P>这是为了增加高度</P>  
            <P>这是为了增加高度</P>  
            <P>这是为了增加高度</P>  
            <P>这是为了增加高度</P>  
            <P>这是为了增加高度</P>  
            <P>这是为了增加高度</P>  
            <P>这是为了增加高度</P>  
            <P>这是为了增加高度</P>  
            <P>这是为了增加高度</P>  
            <P>这是为了增加高度</P>  
            <P>这是为了增加高度</P>  
            <P>这是为了增加高度</P>  
            <P>这是为了增加高度</P>  
            <P>这是为了增加高度</P>  
            <P>这是为了增加高度</P>  
            <P>这是为了增加高度</P>  
            <br />
            <br />
            <input type="button" value="hello" />
            hello the world
       </div>
    </body>
    </html>