隐藏100%高度的iPhone地址栏
关于此的很多帖子,但不完全符合我的情况。我的页面具有灵活的尺寸设置为100%宽度和100%高度,因此典型的有载滚动功能不起作用。任何想法或其他解决方案?
谢谢!
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);
没有找到相关结果
已邀请:
2 个回复
皇小福另届
有关更多详细信息,请查看他的博客文章或Gist。
卧沫
但是我建议扩展Scott Jehl的方法,它解决了一些小的Android / iOS Safari scrollTo差异: https://gist.github.com/scottjehl/1183357