制作弹出框系列教程2--遮罩层

实现遮罩层的div层的代码如下.

<style type='text/css'>
.kui-window-shade {
    position: fixed;
    left: 0;
    top: 0;
     100%;
    height: 100%; 
background-color:#000;
opacity:0.3;
z-index:10003; }
</style> <div id="kui-window-shade-1001" class="kui-window-shade" style="z-index: 1000;"></div>

 上面这段代码要添加到body中,js代码实现如下:

<script type="text/javascript">
function createShade(){
    var html = '<div id="kui-window-shade-1001" class="kui-window-shade" style="z-index: 1000;"></div>';
    $('body').append(html);
}
</script>

原文地址:https://www.cnblogs.com/caogenrenwu/p/kui-kwindow-shade.html