如果我将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" );
}
}
});
}
答案 0 :(得分:3)
使用general sibling combinator ~
。
CSS:
#div_element ~ .ui-dialog-buttonpane button {
background: e7eef9;
}