Mobile Safari iOS 6.0 fixed positioning while keyboard showing

让人想犯罪 __ 提交于 2019-12-22 05:58:37

问题


If you have a fixed position div set to the bottom of the screen, this div does not stay at the bottom while the virtual keyboard is shown. It would move up as the height of the page increases. This problem does not occur in iOS 5 as the div continues to stay at the bottom like it should. Any help?


回答1:


Could you simply hide the fixed div while the keyboard is active?

$("#text_field").focus(function(){
  $("#fixed_div").hide();
});


$("#text_field").blur(function(){
  $("#fixed_div").show();
});


来源:https://stackoverflow.com/questions/12550298/mobile-safari-ios-6-0-fixed-positioning-while-keyboard-showing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!