[英]change colour of title bar in jquery pop up
試圖將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");
標題欄中將應用漸變,就像背景圖片一樣,您必須將其重置。
$(".ui-dialog-titlebar").css("background", "green");
要么
$(".ui-dialog-titlebar").css({'background-color': 'green', 'background-image': 'none'});
這是因為默認對話框標題具有背景圖像。 嘗試將其更改為以下代碼:
$(".ui-dialog-title").css("background", "green");
$(".ui-dialog-titlebar").css({"background": "green", "border": "none"});
看到這個小提琴:
您不需要使用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");
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.