我正在開發一個使用Android PhoneGap和JQuery Mobile的應用程序。當輸入焦點時,JQuery Mobile不適合屏幕
我在登錄頁面有2個輸入,所有工作都很完美,但是當我關注輸入時,頁面不適合屏幕顯示,並且可能是水平滾動。在將輸入框取消對焦之後,該頁面適合再次進行屏幕顯示。
在輸入框中
http://imageshack.us/a/img90/9909/device20121109111004.png
焦點輸入框無焦點的方式,頁面有關於2px的右邊
http://img3.imageshack.us/img3/7078/device20121109111036.png
<div data-role="content">
<form id="loginForm">
<ul data-role="listview" data-inset="true">
<li><div data-role="fieldcontain" class="ui-hide-label">
<input type="text" name="username" id="username" placeholder="username" autocomplete="off" />
</div>
<div data-role="fieldcontain" class="ui-hide-label" >
<input type="password" name="password" id="password" placeholder="password"/>
</div></li>
</ul>
<br /> <br /> <input type="submit" value="Login" name="btnSubmit" id="btnSubmit" />
</form>
</div>
我怎麼固定呢?我希望適合屏幕時,重點放在輸入框 謝謝
我加入機器人。注重輸入時仍然可以水平滾動 – kxavier