好的,我在我的网站上有一个整洁的小登录表单,我喜欢占位符而不是标签!众所周知,微软甚至知道它拥有巨大的资源,但拒绝发布完整的兼容CSS3的HTML5浏览器。他们即便如此贪婪,他们不允许老用户升级到9,除非他们具有Windows Vista/7 ---结束IE咆哮IE强制内联样式重写我的Jquery魔法?
所以我使用的是假密码字段招我在这里读另一篇文章,但我有一个问题!当我尝试使fakepassword字段出现并隐藏密码时,看起来IE似乎在元素上强制某种假内联样式,并且不允许它隐藏!
下面的代码:
//This function hides our fake password field and changes focus to the real one. Yet another IE workaround...
$("#fakepassword").focus(function(){
$('#fakepassword').hide();
$('#password').show();
$('#password').focus();
});
//These functions perform the link hover copycat
$("#titleHover").mouseenter(function(){
$("#titleLarge").css('background-color', '#555');
});
$("#titleHover").mouseout(function(){
$("#titleLarge").css('background-color', 'transparent');
});
$("#titleHover").click(function(){
$("#userMenu").animate({
height: "192px",
}, 250, function() {
// Animation complete. Display form and swap out arrow.
$('#loginForm').css('visibility', 'visible');
$("#titleLarge").css('background-color', 'transparent');
$("#titleHover").unbind('mouseenter').unbind('mouseout');
//Use my sweep function to swap in values for IE
$('html').click(function() {
//Hide the login, animate menu up and swap back in down arrow.
$('#loginForm').css('visibility', 'hidden');
$("#userMenu").animate({
height: "64px",
}, 250, function() {
$("#titleHover").mouseenter(function(){
$("#titleLarge").css('background-color', '#333');
});
$("#titleHover").mouseout(function(){
$("#titleLarge").css('background-color', 'transparent');
});
});
if ($('#password').attr('value') == '') {
$('#password').hide();
$('#fakepassword').show();
}
});
$('#userWrap').click(function(event){
event.stopPropagation();
})
});
});
而IE调试的图像:
中到底是什么^^^
至少这是一个越来越小的祸根...... http://www.reddit.com/r/technology/comments/lxn6s/internet_explorer_falls_below_50_market_share_mark/ –
HTML,请。究竟哪个版本的IE有问题? – Blazemonger
@EricJ。 “越来越小”? :-) – Blazemonger