Style Jquery dialog content div

后端 未结 2 533
旧时难觅i
旧时难觅i 2021-01-24 01:24

I have this situation:

var div = document.createElement(\'div\');
div.id=\"content\";

$(div).dialog(\'open\');

The content of the div opens i

相关标签:
2条回答
  • 2021-01-24 02:01

    for style you can give like this it may help you

    #content{
        width:100%;
        height:100%;
        background-color:black;
        position:fixed;
        top:0;
        left:0
    }
    
    0 讨论(0)
  • 2021-01-24 02:09

    Try a little more advanced but making dialog a little better:)

        $("#myDialog").dialog(
        {                                
            modal: true,
            show: "fade",
            hide: "fade",
            draggable: false,
            resizable: false,
            closeOnEscape: false,
            width: 400,
            position: "top",
            buttons: 
            {
                Close:  function()
                        { 
                            $(this).dialog('close');                                
                        }
            },
            open:   function()
                    {        
                        /* styling dialog */
                        $(this).parents(".ui-dialog:first").find(".ui-dialog-titlebar").remove();             
                        $(this).parents(".ui-dialog").css("padding", 5);  
                        $(this).parents(".ui-dialog").css("border", 0);
                        $(this).parents(".ui-dialog:first").find(".ui-dialog-content").css("padding", 0);
    
                        $(this).css("-webkit-box-shadow", "0px 0px 10px rgba(0, 0, 0, 0.8)");
                        $(this).parents(".ui-dialog").css("-webkit-box-shadow", "0px 0px 10px rgba(0, 0, 0, 0.8)");
                        $(this).parents(".ui-dialog").css("-moz-box-shadow", "0px 0px 10px rgba(0, 0, 0, 0.8)");                        
        });   
    
    0 讨论(0)
提交回复
热议问题