在safari浏览器中,当滚动条至页面底部,点击文档,隐藏滚动条失效
demo3body,ul{
margin:0;
font:12px/1.5 arial,'\5b8b\4f53',sans-serif;
}
ul{
padding:0;
list-style:none;
}
.hide{
overflow:hidden;
}
.wp{
width:1000px;
margin:0 auto;
background:#7c1;
}
.wp li{
width:300px;
height:500px;
}
#box{
width:300px;
height:300px;
background:#fff;
position:fixed;
top:50%;
left:50%;
margin:-150px 0 0 -150px;
}
#overlay{
width:100%;
height:100%;
background:#000;
opacity:0.5;
position:fixed;
left:0;
top:0;
}
window.onload = function(){
document.onclick = function(){
document.body.className = 'hide';
}
}