使用js实现遮罩层
<style>
#1: {position:absolute;
z-index: 1000;
height:100%;
width:100%;
}
#up{
background:yellow;
position:absolute;
z-index: 1000;
height:50%;
width:50%;
top:25%;
left:20%;
padding: 8px;
border:10px blue solid;
display: none;
overflow: auto
}
</style>
<input type="button" value="show" id="show" οnclick="show()">
<div id="1">
</div>
<div id="up">遮罩层<input type="button" value="hidden" id="hidden" οnclick="divhid()"></div>
<script>
function show(){
document.getElementById('1').style.display="block";
document.getElementById('up').style.display="block";
}
function divhid(){
document.getElementById('1').style.display="none";
document.getElementById('up').style.display="none";
}
</script>