<body class= "layout-fixed" > <!--fixed-positioned head--
header, footer, main{Display:Block;}Header{position:fixed;Height:50px; Left:0; Right:0;Top:0;}Footer{position:fixed;Height:34px; Left:0; Right:0;Bottom:0;}Main{Margin-top:50px;Margin-bottom:34px;Height:2000px}This looks like the following.
The keyboard evokes the following
What is it for? : After the soft keyboard is aroused, the fixed element of the page will be invalidated (i.e. cannot be floated or understood as absolute positioning)
Solution: Move the Area field of the original body scroll to inside main
header, footer, main{Display:Block;}Header{position:fixed;Height:50px; Left:0; Right:0;Top:0;}Footer{position:fixed;Height:34px; Left:0; Right:0;Bottom:0;}Main{/*main absolute positioning, internal scrolling*/position:Absolute;Top:50px;Bottom:34px;/*so that it can be scrolled*/overflow-y:Scroll;
/*increase this property to increase the elasticity*/
-webkit-overflow-scrolling:touch;}Main. Content{ Height: 2000px;
}
h5 The bottom input box is blocked by the keyboard.var // browser's current height $ (window). Resize (function() { if(document). Height () < oheight) { $ ( "#footer"). CSS ("position", "static"); } Else { $ ("#footer"). CSS ("position", "absolute"); } });
JS to solve the problem of soft keyboard occlusion input boxLink http://blog.csdn.net/u011500781/article/details/53926425
The mobile page input box is blocked by the keyboard.