很多帖子都是这样的,但并不完全适合我的情况。我的页面的灵活尺寸设置为100%宽度和100%高度,因此典型的加载滚动功能不起作用。任何想法或其他解决方案?隐藏100%身高的iPhone地址栏
谢谢!
CSS:
* {
margin:0;
padding:0;
}
html, body {
width:100%;
height:100%;
min-width:960px;
overflow:hidden;
}
的Javascript:
/mobile/i.test(navigator.userAgent) && !pageYOffset && !location.hash && setTimeout(function() {
window.scrollTo(0, 1);
}, 1000);
101%会使用scrollTo吗? – Jess 2014-03-04 05:47:09
@Jess可能不是,但现在我们可以选择100VH或minimal-ui – technopeasant 2014-03-04 18:29:04