【发布时间】:2016-06-15 02:13:27
【问题描述】:
页面在 IE7 中运行时出现异常故障(在兼容性视图中严格来说是 IE8)。当我使用 XP 模式时,IE6 中也会出现类似的错误(以及一些其他错误),但我不太担心 IE6 的兼容性。
也就是说,当输入框应该作为内联元素居中时,它是左对齐的。相关CSS:
form#prompt {
position: absolute;
height: 300px;
width: 600px;
margin: -150px 0 0 -300px;
top: 50%;
left: 50%;
text-align: center;
}
input#password {
margin: 10px auto;
padding: 5px 10px;
text-align: center;
width: 398px;
display: inline;
}
相关 HTML:
<form id="prompt">
<input type="text" name="password" id="password" />
</form>
现在真正奇怪的是,当您在表单上触发提交侦听器时,它返回 false 并初始化回调 $('#prompt_output').text(' ').css('opacity',0).text('Access granted. Loading...').fadeTo(200,1);,一切正常。输入权限本身。事实上,即使回调只是$('#prompt_output').text(' '),它也可以工作。只选择元素 $('#prompt_output'); 不会做任何事情。
任何帮助将不胜感激。
【问题讨论】:
-
那个链接需要密码
-
可接受的密码是
password,但为了我的描述,您可以输入任何内容来触发表单提交侦听器。
标签: jquery html css layout internet-explorer-7