0
点赞
收藏
分享

微信扫一扫

浮动DIV



  • <style>
  • .aa{height:2000px;width:40px;background:#eee;}   
  • .bb{width:50px;height:80px;background:red;float:right;   
  •     position:fixed !important; top/**/:0px;   
  •     position:absolute; z-index:100; top:expression(offsetParent.scrollTop+20);right:20px;   
  • </style>

  • <div class="aa">
  •     我是不动的。   
  • <script>for(var i=0;i<99;i++){document.write(i+"<br>");}</script>

  • <div class="bb">move</div>

  • </div>
  • 直接保存为html即可预览效果 


举报

相关推荐

0 条评论