我使用的是定制的 ui-dialog
模式。 这在桌面和安卓设备上工作正常。但在IOS设备上,一旦打开虚拟键盘,就会出现问题。通常情况下,一旦键盘显示,它就会被推到内容顶部。我已经用 position: absolute;
并尝试与 relative
但还是不行。谁能帮我解决这个问题...
试试吧
<script>
if( navigator.userAgent.match(/iPhone|iPad|iPod/i) ) {
var s = document.createElement('style'), styleSheet;
document.head.appendChild(s);
styleSheet = s.sheet;
styleSheet.insertRule(".modal { position:absolute; bottom:auto; }", 0);
}
</script>