在jQuery对话框中隐藏标题栏和显示关闭按钮 [英] Hide Title bar and Show Close Button in jQuery Dialog
问题描述
我在 jQuery对话框
中隐藏标题栏如下
$(".ui-dialog-titlebar").hide();
这也隐藏在 Dialog
中的关闭按钮。但我需要在对话框
上显示关闭按钮。
This also hide close button in Dialog
. But i need to show close button on Dialog
.
我该如何做?
推荐答案
添加以下CSS将隐藏标题文本和样式,将关闭按钮保留 - 查看演示 。
Adding the following CSS will hide the title text and style, leaving the close button in place - see demo.
.ui-dialog-title {
display:none;
}
.ui-dialog-titlebar {
background:transparent;
border:none;
}
.ui-dialog .ui-dialog-titlebar-close {
right:0;
}
但是,如果要更改关闭按钮本身的样式在您的其他问题中提到 - 箭头底部的jQuery对话框),然后我建议提出另一个问题,因为显示 closeText
是仍然在使用jQuery主题时遇到问题 - 请参阅 jQuery UI对话框 - 看不到closeText
However, if you want to change the style of the close button itself (as mentioned in your other question - Arrow in Bottom of jQuery Dialog) then I suggest asking another question since showing the closeText
is still a problem when using a jQuery theme - see jQuery UI Dialog - Cannot see the closeText
这篇关于在jQuery对话框中隐藏标题栏和显示关闭按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!