[英]How to solve the issue of position:fixed for a button at the bottom of the screen in iOS (ipad/iphone)?
[英]HTML 5 fixed screen iPad
我似乎找不到正确的标签。 当在某些地方在iPad上滑动屏幕时,整个屏幕都会移动,借助“橡皮筋”效果,我知道有一种锁定屏幕的方法,特定于HTML5和Webkit。
使用<iframe src="" width="1024" height="724" scrolling="no"></iframe>
看起来像是便宜的修补程序,这些是我的标头。
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0"/> <meta name="apple-mobile-web-app-capable" content="yes" /> <meta name="apple-mobile-web-app-status-bar-style" content="black" />
尝试这个:
<script>
// document.body works probably too
document.ontouchmove = function(e) {
e.preventDefault();
};
</script>
请注意,此方法将禁用整个页面的滚动! 有时这可能是不可取的。 如果是这样,请查看如何在iOS Web Apps中禁用橡皮筋?
以防万一人们不阅读答案的评论,这是我在调查@bebraw的评论时发现的解决方案:
这么小的东西需要很多工作,但是可以采用细粒度的方法来了解滚动的内容和不滚动的内容。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.