我有一个Web应用程序,我正在尝试在iPad 3上运行。当我打开它时,该应用程序允许垂直滚动,而不应该这样做。我已经使用其他Web应用程序进行了相同的过程,没有任何问题,并且不确定这次我错过了什么。
在我的HTML的head元素中,我有以下meta标签:
在我的 CSS 中:
在我的HTML的head元素中,我有以下meta标签:
<meta name="format-detection" content="telephone=no">
<meta name="viewport" content="user-scalable=no, initial-scale=1, minimum-scale=1, maximum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi">
<meta name="apple-mobile-web-app-capable" content="yes">
在我的 CSS 中:
html, body { width: 100%; height: 100%; overflow: hidden; }
尝试在weinre中调试此问题,发现文档的宽度和高度不知何故相等,而在横向时高度应该要小得多。
$(document).width(); // returns 1024
$(document).height(); // returns 1024
在Stack Overflow上搜索,其他答案已经提供了视口(meta viewport)标记的解决方案,而我已经在使用。有人能指点我一个解决方案吗?
overflow:hidden!important;
吗? - Panoply