對於混合應用程序,我需要構建應用程序的Web部分。如何在移動設備的100%高度內定位元件
我定義了html和body是視口的100%。 我認爲這是一個好主意,但事實證明,當觸摸鍵盤顯示時,Android會更改視口。所以它調整了頁面上的所有元素。這不是我想要的行爲。
是否可以根據設備高度對元素進行定位和給出尺寸,而不受觸摸鍵盤干擾?這裏http://betapreview.nl/playground/overflow-table/index2.html
問題說明我所做的嘗試已經
選項1
<meta name="HandheldFriendly" content="True"> <meta name="MobileOptimized" content="320"> <meta name="viewport" content="width=device-width, initial-scale=1.0; maximum-scale=1.0; user-scalable=no">
例如:http://betapreview.nl/playground/overflow-table/index2.html
選項2
var theHeight = $(document).height();
$("#wrapper").css("height", theHeight);
例如:http://betapreview.nl/playground/overflow-table/index3.html
Oke很好,但是當我應用你的JS時,我看不到輸入。 請查看http://betapreview.nl/playground/overflow-table/index3.html – Extranion 2012-08-13 13:19:13
您能否爲我提供截圖?我沒有訪問Android設備。 – 2012-08-13 13:31:23
我將在明天提交截圖 – Extranion 2012-08-14 19:03:54