H5 page When the button uses position: fixed;bottom: 0;, clicking the input button will be pushed up
小伙看你根骨奇佳,潛力無限,來學(xué)PHP伐。
Theoretically: the input box is activated and the input method pops up. As a result, the visible area of ??the browser becomes smaller (the window becomes smaller), so it is normal for fixed elements to be pushed up.
If you think this is a bug, you can not fix it; or: hide the button when the input box is activated.
This is a normal phenomenon of fixed. Generally, my method is to use a jQuery method to control it;
As follows:
$(function(){
//焦點(diǎn)時(shí)隱藏
$("input").on("focus",function(){
$(".submit").hide();
});
//失去焦點(diǎn)時(shí)顯示
$("input").on("blur",function(){
$(".submit").show();
});
})
Normal phenomenon: You can reload the same page and do a little processing on it. Personal opinion: You can also display:none the element that will be pushed up when the input box gains focus, and then display:none when the input method is closed (or the input loses focus)