简体   繁体   中英

HTML elements move when keyboard is opened on tablet

I made a simple html page for tablet/smartphone (landscape layout). I have a problem when I tap on a input to write some text, the virtual keyboard move/push every elements.

Screenshot :

在此处输入图片说明

在此处输入图片说明

Any way to prevent that ?

php and css link

It appears your CSS is tied to a percentage of the view height, so when the keyboard is opened the height becomes smaller and shrinks your container.

if you give your main container a min-height you should be able to prevent this happening

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM