当前位置: 代码迷 >> JavaScript >> 有什么办法能100%覆盖页面呢?该如何解决
  详细解决方案

有什么办法能100%覆盖页面呢?该如何解决

热度:37   发布时间:2012-03-29 12:53:12.0
有什么办法能100%覆盖页面呢?
#brume   {
z-index:   98;
display:   none;
position:   absolute;
left:   0;
top:   0;
right:   0;
bottom:   0;
width:   100%;
height:   100%;
}

这种方法,如果有滚动栏就没用了。。。````
有什么能覆盖整个页面的。包括滚动栏下面的```

------解决方案--------------------
#brume {
z-index: 98;
display: none;
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
width: 100%;
height: 3000px;
}
------解决方案--------------------
给你这个吧
Math.max(document.body.scrollHeight, document.documentElement.clientHeight)
这是高的,可以全部遮住
  相关解决方案