Home  >  Q&A  >  body text

javascript - When input gets focus, how can the input box pop up and float with the keyboard?


It can float up in Android (no problem), but it will move down a little after floating up in IOS, causing the keyboard to block the input box

Default layout

Layout in IOS

May I ask how to solve this problem? ?

天蓬老师天蓬老师2686 days ago685

reply all(3)I'll reply

  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-06-12 09:34:17

    We define an attribute for the webview to prevent it from going up after being clicked, and then animate the height of the webview to change.

    reply
    0
  • 迷茫

    迷茫2017-06-12 09:34:17

    Search on Baidu for "Apple position: fixed compatible"

    reply
    0
  • PHP中文网

    PHP中文网2017-06-12 09:34:17

    You can try this method
    http://www.cnblogs.com/cococe...

    reply
    0
  • Cancelreply