天天看点

ie固定定位

 今天有个项目需要做固定的回到顶部的图标,固定定位在i6下面是不支持的,需要通过js控制。

  1. <div id="gotop" style="position:fixed;right:0px;
  2. bottom:0px;
  3. float:right;
  4. _position:absolute;
  5. _bottom:auto;
  6. _top:expression(
  7. eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this.currentStyle.marginBottom,10)||0))); right:0px; zoom:1;"> 
  8.     <a href="#"> 
  9.         <div style="width:51px;height:51px;background:url(<{$home}>/p_w_picpaths/top.jpg);"></div> 
  10.     </a> 
  11. </div>