试图将jquery pop中标题栏的背景颜色更改为绿色(在jsfiddle中看作蓝色)......似乎无法得到它......欢迎任何建议?
$("#dia").dialog({
autoOpen: true,
title:"Access Point",
height: 200,
width: 300,
modal: false,
draggable: true,
position: [900, 150],
dialogClass: "foo",
//show: {effect: 'bounce', duration: 350, times: 3}
show: {effect: 'fade', duration: 2000}
});
$(".ui-dialog-titlebar").css("background-color", "green");
$(".ui-dialog").css("background-color", "green");
$(".ui-dialog-title").css("background-color", "green");
$(".ui-dialog-content").css("background-color", "green");
答案 0 :(得分:0)
在标题栏中应用渐变,就像背景图片一样,您必须重置它。
$(".ui-dialog-titlebar").css("background", "green");
或
$(".ui-dialog-titlebar").css({'background-color': 'green', 'background-image': 'none'});
答案 1 :(得分:0)
这是因为默认对话框标题有背景图像。尝试将其更改为以下代码:
$(".ui-dialog-title").css("background", "green");
$(".ui-dialog-titlebar").css({"background": "green", "border": "none"});
看到这个小提琴:
答案 2 :(得分:0)
您无需使用JS
更改背景颜色。
.ui-widget-header,.ui-dialog-titlebar,.ui-dialog,.ui-dialog-title,.ui-dialog-content{
background: none green;
}
示例:http://jsfiddle.net/dEvKb/3257/
$(".ui-widget-header,.ui-dialog-titlebar,.ui-dialog,.ui-dialog-title,.ui-dialog-content").css("background", "green");