日期:2014-05-16  浏览次数:20370 次

各位高手,大侠帮帮忙。。。急急急!!!
怎样实现新浪微博登录以后菜单导航的效果,就是那个不会随着鼠标移动,一直都在最上端。。。请高手帮忙啊

------解决方案--------------------
HTML code

 
<!doctype html>
<html dir="ltr" lang="zh-CN">
  <head>
    <meta charset="utf-8"/>
    <title>CSS Position Fixed for IE6</title>
    <style>


* html,* html body   {background-image:url(about:blank);background-attachment:fixed;}
* html .fixed-top    {position:absolute;bottom:auto; top:expression(eval(document.documentElement.scrollTop +(document.documentElement.clientHeight-this.offsetHeight)/2 ));}
* html .fixed-right  {position:absolute;right:0px;left:auto;}
* html .fixed-bottom {position:absolute;bottom:auto;top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this.currentStyle.marginBottom,10)||0)));}
* html .fixed-left   {position:absolute;right:auto;left:expression(eval(document.documentElement.scrollLeft));}
.fixed-bottom  {
  position:fixed;
  left:0px;
  bottom:20px;
  background:aqua;
  width:200px;
  height:200px;
}
.fixed-right{
  position:fixed;
  right:0px;
  left:auto;
  top:200px;
  top:expression(eval(document.documentElement.scrollTop +(document.documentElement.clientHeight-this.offsetHeight)/2 ));
  background:red;
  width:200px;
  height:200px;
}
.fixed-top{
  position:fixed;
  top:0px;
  left:0px;
  background:blue;
  width:200px;
  height:200px;
}
    </style>

  </head>
  <body>
  <div style='height:2000px;width:500px;margin:10px auto; border:1px solid red;'></div>
   <div class="fixed-top"></div>
    <div class="fixed-bottom"></div>
     <div class="fixed-right"></div>
    
  
  </body>
</html>