简体   繁体   English

身体背景与模态窗口重叠如何解决?

[英]Body background overlap with modal window how to tackle this?

i have create one dialog box with following code 我用下面的代码创建了一个对话框

$(function(){

    $('#saveandcontinue').click(function(){   
        $('body').css('background', '#999');
        $('.footer').css('background', '#999');
        $('.utility-nav').css('background', '#999');
        $('#savedialog').show("slow");          
    });

    $('#directory').click(function(){
        var UR = document.URL;
        var email = document.getElementById('email').value;
        document.cookie="emailID="+email+";path=/";
        //document.cookie="UR="+UR+";path=/scenario3/";
        var ID = getQuerystring("id");
        document.cookie="ID="+ID+";path=/";
        $('#savedialog').hide("slow");
        $('body').css('background', '#FFFFFF');
        $('.footer').css('background', '#FFFFFF');
        $('.utility-nav').css('background', '#FFFFFF');
        location.href=UR;
        checkCookie();
    });

    $('#cnl24').click(function(){
        $('#savedialog').hide("slow");
        $('body').css('background', '#FFFFFF');
        $('.footer').css('background', '#FFFFFF');
        $('.utility-nav').css('background', '#FFFFFF');
    });

    $('#close24').click(function(){
        $('#savedialog').hide("slow");
        $('body').css('background', '#FFFFFF');
        $('.footer').css('background', '#FFFFFF');
        $('.utility-nav').css('background', '#FFFFFF');
    });

});

but color body is overlaping with modal window. 但是颜色主体与模式窗口重叠。 when dialog openend background and content of my body overlap with content of dialog box so how can i make it diffent. 当对话框开放背景和我的身体内容与对话框内容重叠时,如何使它与众不同。

Here you can check my actual problem - http://jsfiddle.net/MW83W/1/ please check it by click on save and continue link. 在这里您可以检查我的实际问题-http://jsfiddle.net/MW83W/1/,请单击“保存并继续”链接进行检查。

If I got you right, just set it's height to auto with some css: 如果我对的话,只需将CSS的高度设置为自动即可:

#savedialog {
    background: white; /* optional */
    height: auto;
}

JSfiddle 的jsfiddle

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM