gpt4 book ai didi

jQuery UI 对话框标题栏太高

转载 作者:行者123 更新时间:2023-12-03 22:14:51 27 4
gpt4 key购买 nike

我正在使用 jQuery UI 对话框在我的一个页面上弹出一些补充信息。由于某种原因,在 Chrome 11 和 Firefox 4 中,标题栏高得离谱。由于某种原因,它在 IE 9 中没问题。下面是它的屏幕截图:

Screenshot of too-tall UI titlebar

我尝试过手动设置标题栏的高度,这只会调整标题栏的彩色区域的大小,但不会调整标题文本或段落文本的位置。在 Chrome 开发者工具中检查发现没有可能导致此问题的奇怪边距或填充。任何人都知道可能是什么原因造成的?下面我包含了该对话框的脚本和标记。据我所知,没有特殊的 CSS 应用于此对话框(标准 jQueryUI CSS 除外)。如果重要的话,我将 ASP.Net/C# 与 jQuery 1.5.2 和 jQueryUI 1.8.12 一起使用。

ASP/HTML:

<!-- ssn -->
<div class="input-block">
<asp:Label ID="lblSsn" runat="server" CssClass="input-label" AssociatedControlID="tbSsn">Social Security Number (<a id="show-ssn-disclosure" href="#">More Info</a>)</asp:Label>
<asp:TextBox ID="tbSsn" runat="server" CssClass="input" />
<div id="ssn-disclosure-text">
<p>SSN disclosure is <strong>highly recommended</strong> if you have one. The University is required by federal law to report your SSN and other pertinent information
to the Internal Revenue Service pursuant to the reporting requirements imposed by the Taxpayer Relief Act of 1997. The University will use the SSN you provide to
verify the identity of each applicant, to link to the Payroll Office to verify amounts paid to students receiving teaching assistantships and research assistantships,
and to link financial awards and admission data to registration histories and student records. This record-keeping system was established before January 1, 1975,
pursuant to the authority of the Regents of the University of California under Article IX, Section 9 of the Constitution of the State of California. This notification
is provided to you as required by the Federal Privacy Act of 1974.</p>
</div>
</div><!--/input-block-->

脚本:

$(function() {
//hide ssn disclosure dialog box
var $ssnDialog = $('#ssn-disclosure-text').hide().dialog({
autoOpen: false,
resizable: false,
modal: true,
width: 500,
title: 'SSN Disclosure'
});

//binding for ssn disclosure dialog
$('#show-ssn-disclosure').click(function(e) {
e.preventDefault();
$ssnDialog.dialog('open');
});
});

任何可行的修复建议将不胜感激。

最佳答案

您始终可以使用以下方式设置其样式:

.ui-dialog .ui-dialog-titlebar 
{
height: 40px; /* or whatever you want */
}

我想补充一点,我测试了 FF4.01 和 Chrome 11,您的代码对我有用,请参阅 working jsFiddle demo

关于jQuery UI 对话框标题栏太高,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6036331/

27 4 0