【问题标题】:How can i add background color to button area only?如何仅将背景颜色添加到按钮区域?
【发布时间】:2013-09-14 21:19:39
【问题描述】:

如果我将background:#e7eef9; 添加到jQuery("#div_element").dialog,这将附加到整个对话框。我怎样才能将其仅附加到 buttons 区域?

function test(buttonEl)
{
    jQuery("#div_element").dialog({
         resizable: false,
         height:200,
         modal: true,
         width: 300,
         buttons: {
            Cancel: function() {
                 jQuery( this ).dialog( "close" );
            }
         }
    });
}

【问题讨论】:

标签: jquery css jquery-ui jquery-ui-dialog


【解决方案1】:

使用general sibling combinator~

CSS:

#div_element ~ .ui-dialog-buttonpane button {
    background: e7eef9;
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-06-24
    • 2014-01-10
    • 1970-01-01
    • 2020-04-08
    • 1970-01-01
    • 2020-08-19
    • 2013-08-06
    • 2021-08-10
    相关资源
    最近更新 更多