mask layer

<style>
#BgDiv{
width:100%;
height:100%;
background-color: rgba(0,0,0,0.05);
opacity: 0.3;

}
</style>
 
<div id="BgDiv" style="display: none;"></div>
 
Close button plus class .click-close-hide 
click display button #newQuestionBtn and #addTable

<script>
// The mask layer is displayed and hidden
// Click to add to make the mask layer appear
$('body').on('click','#addTable',function(){
$('#BgDiv').show ();
$('#BgDiv').css("z-index","1000");
})



//Click on the new question to make the mask layer appear and hide the added pop-up box
$('body').on('click','#newQuestionBtn',function(){
$('#BgDiv').show ();
$('#BgDiv').css("z-index","1000");
$('.modal-dialog.modal-lg .modal-content ').hide();
})
$( 'body').on('click','.click-close-hide',function(){
$('#BgDiv').hide();
$('.modal-dialog.modal-lg .modal- content ').show();
$('#BgDiv').css("z-index","-1");
})
</script>

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325020249&siteId=291194637