键盘显示搞砸元素的位置 [英] Keyboard Showed messed up elements' position

查看:169
本文介绍了键盘显示搞砸元素的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的游戏需要移动的触摸式键盘的输入。它的显示器有问题,只要键盘显示了在文本输入焦点,所有的元件,它的位置是:绝对得乱七八糟。

I have game which require the input of touch keyboard of the mobile. Its display has problem, whenever the keyboard shows up at the text input focus, all my element which position: absolute gets all messed up.

有一个插件,使移动键盘总是出现让我重新定位的所有元素或者我需要改变的CSS,使元素,使得不要弄乱时,键盘显示出来?

Is there a plugin that enables mobile keyboard to always show up so that I re-position all the elements OR I need to alter the css to make the elements so that the do not mess up when the keyboard shows up?

我应该如何实现呢?

这是该元素的CSS之一:

This is one of the element css:

#mixer{  
    position: absolute;  
    bottom:29%;
    left:25%;
    width: 234px;  
    height: 210px;  
    background: transparent url(img/mixer.png) 0 50px no-repeat;  
} 

注:我使用jQuery Mobile的,的PhoneGap在Android环境

Note: I am using Jquery mobile, phonegap on Android environment.

推荐答案

在你的Andr​​oidManifest.xml中,用键盘的活动下添加以下行:

In your AndroidManifest.xml, add the following line under the activity with the keyboard:

安卓windowSoftInputMode =adjustNothing

这篇关于键盘显示搞砸元素的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆