我似乎找不到合适的标签。当在 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>
请注意,这种方法会禁用整个页面的滚动!有时这可能是不可取的。如果是这样,请查看How to Disable Rubber Band in iOS Web Apps?
关于iphone - HTML 5 固定屏幕 iPad,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7260270/