页面加载后的1-3秒后,我的页面跳回到顶部。 我开始滚动页面加载的第二个页面。它跳回来。 我找不到问题。任何人有任何想法是为什么?页面加载后跳转
http://vietnam.asiastreetfood.com/vietnamesischer-feuertopf/
页面加载后的1-3秒后,我的页面跳回到顶部。 我开始滚动页面加载的第二个页面。它跳回来。 我找不到问题。任何人有任何想法是为什么?页面加载后跳转
http://vietnam.asiastreetfood.com/vietnamesischer-feuertopf/
一个可能的罪魁祸首是什么,做:
document.location.href = "#";
或
document.location.href = "#missinganchor";
哪里missinganchor
是没有显示在页面上定义一个锚。这会导致页面跳到到顶部。
这是你的代码:
$(document).ready(function() {
$('input[placeholder]').placeholder();
});
$(window).load(function() {
var vWrapWidth = -$("#wrapper").width()/2;
var vWrapHeight = -$("#wrapper").height()/2;
$("#wrapper").css({'margin-left' : vWrapWidth});
$("#wrapper").css({'margin-top' : vWrapHeight});
var vCompWidth = -$(".company a img").width()/2;
$(".company a img").css({'margin-left' : vCompWidth});
});
的部分在$(window).load(function(){})
不会触发,直到所有的图片都完全呈现,这可能需要几秒钟。 .css更改为您的边距可能会导致跳跃行为。
这是我的登录页面。我无法滚动。 – Halcyon 2013-03-20 21:04:59
我看不到你的问题使用Chrome – sdespont 2013-03-20 21:07:55
没有登录页面 – Max 2013-03-20 21:08:54