Mobile layouts often use absolute positioning (absolute) and fixed positioning (fix) to lay out a layer. Then there will be some information on this layer, when the layer above is input, the mobile input information will pop up the virtual keyboard, which will affect our layout, bring us trouble. Often encountered but rarely tidy, again met again confused, take advantage of this time, I test the success of my methods recorded. Specific to see their own application, purely personal test.
Case one, a layer written in absolute (class named Elayer), the layer is set with the background color, and then the layer above the layout has input. When the input soft keyboard pops up, the layer moves upwards with the background, and then there is a portion of the space below, with the default color not the background color set. The original settings are as follows:
. Evallayer {position:absolute; width:100%; height:100%; background:rgb (81,79,97); top:0; Left:0; z-index:One;}
Resolved as follows:
. Elayer {position:absolute; width:100%; min-height:100%; Bottom:0; background:rgb (81,79,97); top:0; Left:0; z-index:one; overflow-y:auto;}
In subsequent updates
Virtual keyboard impact layout for mobile input