好的,我在我的網站上有一個整潔的小登錄表單,我喜歡佔位符而不是標籤!衆所周知,微軟甚至知道它擁有巨大的資源,但拒絕發佈完整的兼容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