Home > front end >  H5 at the bottom of the page to develop mobile phone input method jacking the navigation bar
H5 at the bottom of the page to develop mobile phone input method jacking the navigation bar

Time:09-25

To develop mobile phone input method, as shown in the topic of H5 page jacking the navigation bar at the bottom of the

We have solved the problem

Created another problem, however, is to pack up the input method, at the bottom of the navigation bar is gone ~ ~ ~ ~ ~ have to click on next to the position of other blank,,,

CodePudding user response:

Finally how to solve,

CodePudding user response:

Use positioning problem to solve
Var oHeight=$(document). Height (); The height of the browser//current

$(window). The resize (function () {

If ($(document). Height () & lt; OHeight) {

$(" # footer "). The CSS (" position ", "static");
} else {

$(" # footer "). The CSS (" position ", "absolute");
}

});

The second method is to change but the height of the area
Var loaclHeight=$(" section "). The height ();//get visual width
$(" input, textarea "). The focus (the function () {
Var keyboardHeight=localHeight - $(" section "). The height ();//get the height of keyboard
Var keyboardY=localHeight - keyboardHeight;
Var addBottom=(parseInt ($(this). The position (). The top) + parseInt ($(this). The height ()));//the bottom of the text field
Var offset=addBottom - keyboardY;//calculate the distance the slide
$(" section "). The scrollTop (offset);
});

CodePudding user response:

H5 page development mobile phone input method jacking the navigation bar at the bottom of the how to solve
  • Related