我的html设计需要你的帮助。 所以,基本上我有这样的表格,它工作正常。
但是当我用键盘打开它时,它会向上滚动。
我想在页面末尾保持页脚。无论键盘是否启动都可见。
这是图像。
这是css代码。
/**
* putJSONObject
*
* @param url
* @param jsonObject
* @param timeoutMillis
* @return
*/
protected static JSONObject putJSONObject (String url, JSONObject jsonObject, int timeoutMillis) throws IOException, JSONException {
StringBuilder stringBuilder = new StringBuilder ();
HttpURLConnection httpURLConnection;
DataOutputStream printout;
httpURLConnection = (HttpURLConnection) new URL (url).openConnection ();
httpURLConnection.setRequestMethod ("POST");
httpURLConnection.setReadTimeout (timeoutMillis);
httpURLConnection.setConnectTimeout (timeoutMillis);
httpURLConnection.setDoInput (true);
httpURLConnection.setDoOutput (true);
httpURLConnection.setUseCaches (false);
httpURLConnection.connect ();
// Send POST output.
printout = new DataOutputStream (httpURLConnection.getOutputStream ());
printout.writeBytes ("msg=" + URLEncoder.encode (jsonObject.toString (), "UTF-8"));
printout.flush ();
printout.close ();
InputStreamReader inputStreamReader = new InputStreamReader (httpURLConnection.getInputStream ());
int read;
char[] buff = new char[4096];
while ((read = inputStreamReader.read (buff)) != -1) {
stringBuilder.append (buff, 0, read);
}
httpURLConnection.disconnect ();
return new JSONObject (stringBuilder.toString ());
}
答案 0 :(得分:0)
Yoy不能用纯CSS做到这一点。当键盘出现时,你将不得不使用JS / jQuery来隐藏页脚。不幸的是,没有办法检测键盘何时触发,所以你需要一些技巧才能这样做。