读书人

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

发布时间: 2012-03-29 12:53:12 作者: rapoo

有什么办法能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)
这是高的,可以全部遮住

读书人网 >JavaScript

热点推荐