纯htlm 弹出层弹窗
代码如下:
<style>
.white_content {
display: none;
position: absolute;
left: 25%;
width: 50%;
padding: 6px 16px;
border-top: 30px solid #6cabc5;
background-color: white;
z-index:1002;
overflow: auto;
border-radius: 10px;
}
.black_overlay {
display: none;
position: absolute;
top: 0%;
left: 0%;
width: 100%;
height: 100%;
background-color:#f5f5f5;
z-index:1001;
opacity:.80;
filter: alpha(opacity=80);
}
.close {
margin-top: -28px;
margin-right: 20px;
}
.close a {
color:#fff;
text-decoration:none;
font-size:14px;
position: fixed;
}
</style>
<script>
function show(tag){
var light=document.getElementById(tag);
light.style.display='block';
$("#fade").css('display','block');
}
function hide(tag){
var light=document.getElementById(tag);
light.style.display='none';
$("#fade").css('display','none');
}
</script>
<a href="javascript:void(0)" onclick ="show('light')">点击</a>
<div id="light" class="white_content">
<div class="close"><a href="javascript:void(0)" onclick ="hide('light')"> 关闭</a></div>
<div style="overflow:scroll;height:450px;" >
111
</div></div>